From ebc42ce766a60e6335d0f1f3c868fa11ea7fcf92 Mon Sep 17 00:00:00 2001 From: wengcan <572037922@qq.com> Date: Tue, 14 Oct 2014 03:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9:=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20ng-switchery.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ng-switchery.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ng-switchery.js b/src/ng-switchery.js index b181129..b9044f4 100644 --- a/src/ng-switchery.js +++ b/src/ng-switchery.js @@ -54,7 +54,10 @@ angular.module('NgSwitchery', []) }) }, 0); } - initializeSwitch(); + scope.$watch('initValue',function(){ + initializeSwitch(); + }); + } return {