[AngularJS]19. ng-include
Notice that we have created an empty html file called product-description.html. Separate out the Description Tab's content into the new html file. Include the product-description.html in our index where it belongs.
Separate out our description tab into product-description.html.
index.html <!-- Description Tab's Content --> <div ng-show="tab.isSet(1)"> <h4>Description</h4> <blockquote>{{product.description}}</blockquote> </div>
Should change to:
<!-- Description Tab's Content --> <div ng-show="tab.isSet(1)"> </div>
And the product-description.html
<!-- Move the description tab here! --> <h4>Description</h4> <blockquote>{{product.description}}</blockquote>
In index.html, using ng-include="'...'", to include the new file
<div ng-show="tab.isSet(1)" ng-include="'product-description.html'">

浙公网安备 33010602011771号