Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. method() {
  2. if ($state.current.name === 'panelA') {
  3. do_something_for_panel_A();
  4. }
  5. if ($state.current.name === 'panelB') {
  6. do_something_for_panel_B();
  7. }
  8. }
  9.  
  10. angular.module('my-app')
  11. .directive('panelOne', function () {
  12. return {
  13. restrict: 'E',
  14. templateUrl: 'panel.html',
  15. controllerAs: 'panelCtrl',
  16. controller: 'PanelOneController',
  17. scope: true
  18. };
  19. });
  20.  
  21. angular.module('my-app')
  22. .directive('panelTwo', function () {
  23. return {
  24. restrict: 'E',
  25. templateUrl: 'panel.html',
  26. controllerAs: 'panelCtrl',
  27. controller: 'PanelTwoController',
  28. scope: true
  29. };
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement