uif-selected
attribute, allowing to programatically control which link/tab should be selected.
.ms-Pivot { overflow-x: initial; }
uif-size
can be used to control size of the pivot:uif-type
can be used to control type of the pivot - tabs or regular:uif-selected
can be used to capture and control which element is/should be selected:ng-click
directive.
This markup:
<uif-pivot uif-type="{{vm.selectedType}}" uif-size="{{vm.selectedSize}}" uif-pivots="vm.pivots" uif-selected="vm.selectedPivot" id="msPivot"> <uif-pivot-ellipsis ng-click="openMenu()"> <uif-contextual-menu uif-is-open="vm.menuOpened" uif-close-on-click="true"> <uif-contextual-menu-item uif-text="'New'"></uif-contextual-menu-item> <uif-contextual-menu-item uif-text="'Edit'"></uif-contextual-menu-item> <uif-contextual-menu-item uif-text="'Delete'"></uif-contextual-menu-item> <uif-contextual-menu-item uif-type="divider"></uif-contextual-menu-item> <uif-contextual-menu-item uif-text="'Settings'"></uif-contextual-menu-item> </uif-contextual-menu> </uif-pivot-ellipsis> </uif-pivot>
Gives following output:
Selected pivot: {{vm.selectedPivot | json}}