One, implementing a label page through normal instruction
<link rel= "stylesheet" href= "Views/show/tab.css"/> <div> <ul class= "nav nav-tabs" ng-init= " Vm.activetab=1 "> <li ng-class=" {Active:vm.activeTab = = 1} "><a href=" javascript:; "ng-click=" Vm.activetab = 1 "> Label 1</a></li> <li ng-class=" {Active:vm.activeTab = = 2} "><a href=" javascript:; "ng-click=" Vm.activetab = 2 "> tags 2</a></li> </ul> <div class=" Tab-content tab-bordered "> <div class=" Tab-panel "ng-show=" Vm.activetab = 1 "> Label 1 content </div> <div class=" Tab-panel "ng-show=" Vm.activetab = 2 "
;
Tags 2 content </div> </div> </div>
Two, custom Directive implementation label Page
(1) First to resolve the instructions must be written in a root tag, be sure to use div wrapped
(2) Directive external pass parameter to use Ng-model, to declare variable,
scope:{in command
Value: ' Ngmodel '
To assign a value
Summarize
The above is about ANGULARJS implementation of all the contents of the label page, I hope this article for everyone to learn or use ANGULARJS can help, if you have questions you can message exchange.