javascript - Where do I palce the "ng-app" directive in ASP.net MVC application for each pages? -


if use master layout page in mvc application add tag layout page. can add "ng-app" directive body tag. common mvc application should if want separate "ng-app" directive each view page in mvc application ??

i put controller name , action viewdata can add css class body tag:

        viewdata["controller"] = routedata.values["controller"].nullsafetostring().tolower();         viewdata["action"] = routedata.values["action"].nullsafetostring().tolower(); 

then

<body class="@controller-@action"> 

you use method create ng-app attribute instead

or

the ng-app doesn't have on body tag. has on tag wraps angular activity. applied first div in each view, instead of in master layout.


Comments