From 914396ede04fd0badba4e81d53166e558287818e Mon Sep 17 00:00:00 2001 From: Mrinal Date: Thu, 11 Aug 2016 16:19:46 +0530 Subject: [PATCH] ng-change-feature added --- angular-ui-switch.js | 51 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/angular-ui-switch.js b/angular-ui-switch.js index 9a6b591..60d02fe 100644 --- a/angular-ui-switch.js +++ b/angular-ui-switch.js @@ -1,28 +1,29 @@ angular.module('uiSwitch', []) -.directive('switch', function(){ - return { - restrict: 'AE' - , replace: true - , transclude: true - , template: function(element, attrs) { - var html = ''; - html += ''+attrs.on+'' : ''; /*switch text on value set by user in directive html markup*/ - html += attrs.off ? ''+attrs.off + '' : ' '; /*switch text off value set by user in directive html markup*/ - html += ''; - return html; + .directive('switch', function() { + return { + restrict: 'AE', + replace: true, + transclude: true, + template: function(element, attrs) { + var html = ''; + html += '' + attrs.on + '' : ''; /*switch text on value set by user in directive html markup*/ + html += attrs.off ? '' + attrs.off + '' : ' '; /*switch text off value set by user in directive html markup*/ + html += ''; + return html; + } } - } -}); + });