Skip to main content
added alternative
Source Link
Pankaj Parkar
  • 136.3k
  • 23
  • 241
  • 307

Maintain one variable which contains Views html list, like []below, and that can be render it by using ng-repeat

Controller

$scope.viewList = ['View1','View2','View3'];

HTML

 <li><a href ng-repeat="view in viewList" ng-click="vm.showPanel(view )">Next</a></li>

More elegant solution would be to re implement you whole show tab and hide tab logic using ui-router or angular-route as it looks like pure SPA thing.

Plunkr for Angular Route

Plunkr for Angular UI-Router

Maintain one variable which contains Views html list, like []

Controller

$scope.viewList = ['View1','View2','View3'];

HTML

 <li><a href ng-repeat="view in viewList" ng-click="vm.showPanel(view )">Next</a></li>

Maintain one variable which contains Views html list, like below, and that can be render it by using ng-repeat

Controller

$scope.viewList = ['View1','View2','View3'];

HTML

 <li><a href ng-repeat="view in viewList" ng-click="vm.showPanel(view )">Next</a></li>

More elegant solution would be to re implement you whole show tab and hide tab logic using ui-router or angular-route as it looks like pure SPA thing.

Plunkr for Angular Route

Plunkr for Angular UI-Router

Source Link
Pankaj Parkar
  • 136.3k
  • 23
  • 241
  • 307

Maintain one variable which contains Views html list, like []

Controller

$scope.viewList = ['View1','View2','View3'];

HTML

 <li><a href ng-repeat="view in viewList" ng-click="vm.showPanel(view )">Next</a></li>