i creating dynamic angular element on new page follows
index.html
var openprint = window.open('/acimageviewer/html/imagelibraries.html'); openprint.onload = function() { var doc = openprint.document; $(doc.body).html('<jqyiviewer class="filter_icon_ul viewerheight" id="acimgviewer" src="http://www.wellclean.com/wp-content/themes/artgallery_3.0/images/car3.png" align="centre" width="auto" height="500" data="data"></jqyiviewer>'); };
this opens new page have libraries , directives , css loaded follows (imagelibraries.html)
<html ng-app="aciviewerapp"> <head> <meta charset="utf-8"> <title>image viewer</title> <link href="/acimageviewer/css/kendo.common.min.css" rel="stylesheet"> <link href="../css/new_kendo.css" rel="stylesheet"> <link href="../css/jquery.iviewer.css" rel="stylesheet"> <link href="../css/style.less" rel="stylesheet/less"> <script type="text/javascript" src="../libs/angular.min.js"></script> <script type="text/javascript" src="../libs/less.js"></script> <script type="text/javascript" src="../libs/jquery-1.8.3.min.js"></script><!--jquery library--> <script src="../libs/jquery-ui.min.js"></script><!--jquery library --> <script src="../libs/acimageviewer.js"></script><!--jquery library imageviewer--> <script src="../libs/kendo.all.min.js"></script><!--for kendo functionality --> <script src="../libs/jquery.mousewheel.js"></script><!--jquery library use mouse event--> <script src="../js/app.js"></script> <script src="../js/directives/directives.js"></script><!--directive iviewer--> </head> <body> </body> </html>
the body getting dynamically generated in index.html. problem directive.js not replacing jqyiviewer tag.
i using same tag in index.html , here works fine.
i guessing directive.js gets loaded , compiles 1st , after tag gets inserted , not replace it.
Comments
Post a Comment