javascript - Loading a partial view into a Div AngularJS -
i'm relatively new angular , toying around simple spa, of experience comes vs , mvc 5, know can done partial views. can't seem figure out angular.
in plunkr, have example:
http://plnkr.co/edit/h4yyrnvwltisoahyhvxa?p=preview
basically, dynamic list of links point different view, have home.
however can't seem view load when hardcoded.
i think should using ng-include:
<div class="col-lg-12" ng-include ng-src="home.html"> </div>
i don't recommend use ng-include
kind of logic. angular router, angular new router, , ui-router have functionality, , have many features built in.
however, address concern specific code snippet, ng-include
expects value passed it. value passed should model property evaluates string, or string constant. in case of string constant, should included in single quote '
. so, try this:
<div class="col-lg-12" data-ng-include="'home.html'" > </div>
Comments
Post a Comment