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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -