Angular JS doesn't get loaded for Partial View in ASP.NET MVC3

1,432 views
Skip to first unread message

Umesh Swami

unread,
Feb 11, 2013, 6:51:55 AM2/11/13
to ang...@googlegroups.com
I have ASP.NET MVC page which has wizard as partial view to change the content dynamically, but that content part don't have reference of angular JS. while Angular JS is already loaded for whole page on first step of wizard. 

Also Unable to realod the directives and controllers used  for Select2 drop down in the step3 of wizard. 

Any pointer in this regard would be helpful.

Thanks,
Umesh Swami.

Rekna Anker

unread,
Apr 26, 2013, 7:42:42 PM4/26/13
to ang...@googlegroups.com
You'll have to add manual bootstrapping of angular to your partial view:

<script>
    angular.element(document).ready(function () {
        angular.bootstrap($("#appElement"), ['myApp']); // appElement is the html element on which you define ng-app, myApp is the name of the app
    });
</script>
Reply all
Reply to author
Forward
0 new messages