http://stackoverflow.com/questions/20025101/how-to-decide-when-to-use-...
Simply put,
Use ng-view. This method can easily implement page combination by using routing control. But this method also has a major disadvantage, that is, there can only be one ng-view in an html file. There are workarounds though. He can be controlled by ctl.
ng-include extracts common pages from multiple pages, such as header.html, footer.html, etc., and introduces them with <dv ng-include="header.html"></p> on each page.
I personally tested it, and regarding ng-include的说法不太对,用法应该是<p ng-include="'header.html'">, there should be a single quotation mark in the middle. Reference from: http://www.runoob.com/angular...
http://stackoverflow.com/questions/20025101/how-to-decide-when-to-use-...
Simply put,
Use ng-view. This method can easily implement page combination by using routing control. But this method also has a major disadvantage, that is, there can only be one ng-view in an html file. There are workarounds though. He can be controlled by ctl.
ng-include extracts common pages from multiple pages, such as header.html, footer.html, etc., and introduces them with
<dv ng-include="header.html"></p>
on each page.I personally tested it, and regarding
ng-include
的说法不太对,用法应该是<p ng-include="'header.html'">
, there should be a single quotation mark in the middle. Reference from: http://www.runoob.com/angular...