Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. $scope.addElet= function(){
  2. ------
  3. $state.go('state1',{OBJ: OBJ});
  4. }
  5.  
  6. myApp.run(function($rootScope, $modal,$state) {
  7. $rootScope.$on('$stateChangeStart', function(event, toState,toParams) {
  8. if (toState.name == 'addPopup') {
  9.  
  10. $modal.open({
  11. templateUrl : 'add.html',
  12. controller : 'ModalCtrler',
  13. backdrop: 'static',
  14. keyboard: false,
  15.  
  16.  
  17. });
  18.  
  19. event.preventDefault();
  20.  
  21. }
  22.  
  23. }
  24.  
  25. }
  26.  
  27. <a ui-sref="addPopup({OBJ: OBJ})">
  28. <button type="button" class="btn btn-add pull-right">ADD</button>
  29. </a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement