From 4470f88e3e9267bc709bf35358211bf2735c8ad7 Mon Sep 17 00:00:00 2001 From: Jamie Kemp Date: Mon, 15 Jun 2015 17:06:48 +0100 Subject: [PATCH] IE8 Bug Fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - class is a reserved key word. Changed to className - replace: true causes error: Template for directive 'switch' must have exactly one root element. …change to replace: false --- angular-ui-switch.js | 4 ++-- angular-ui-switch.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angular-ui-switch.js b/angular-ui-switch.js index 4108863..baa39cd 100644 --- a/angular-ui-switch.js +++ b/angular-ui-switch.js @@ -3,12 +3,12 @@ angular.module('uiSwitch', []) .directive('switch', function(){ return { restrict: 'AE' - , replace: true + , replace: false , transclude: true , template: function(element, attrs) { var html = ''; html += ''+e.on+"":"",s+=e.off?''+e.off+"":" ",s+=""}}}); \ No newline at end of file +angular.module("uiSwitch",[]).directive("switch",function(){return{restrict:"AE",replace:false,transclude:true,template:function(c,a){var b="";b+="'+a.on+"":"";b+=a.off?''+a.off+"":" ";b+="";return b}}}); \ No newline at end of file