javascript - AngularJs and Jquery error in loaded div content -
i'm working in web, need load div content using jquery function: $('#mainpage').load($(this).attr('maincontent'));
in index.php have configured directive ng-app=".myapp" , i'm using ng-controllers there , works fine, using ng-controllers inside loaded page in #mainpage div doesn't works fine, solution have tryied:
angular.element(document).ready(function() { angular.bootstrap(document, ['myapp']); });
and loads correctly , controller working fine, if load again div space angular crash error:
error: [ng:btstrpd] http://errors.angularjs.org/1.4.3/ng/btstrpd?p0=....
(that means angular bootstapped)
i can't load div's content using ng-includes directive because shoud use jquery , javascript inside loaded page, don't know how solve problem...
thanks much!!!
Comments
Post a Comment