SHARE
TWEET

Untitled

a guest Jun 19th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var myapp = angular.module('myApp',[]);
  2.    
  3.     myapp.controller('Controller', ['$scope', function($scope) {
  4.         $scope.isLoading = false;
  5.  
  6.      }])
  7.     .directive('progressButton', function(){
  8.       return {
  9.         restrict: 'E',
  10.         scope: {
  11.           className: '@',
  12.           buttonText: '@',
  13.           loading: '='
  14.         },
  15.         template: '<button type="button" ng-disabled="{{loading}}" class="{{className}}">{{buttonText}}</button>'
  16.       }
  17.     })
  18.  
  19. // In HTML
  20. /*
  21. <div ng-controller="Controller">
  22.   <progress-button loading="isLoading" button-text="Login" class-name="btn btn-primary"></progress-button>
  23.   </div>
  24. */
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top