标签:new efi github $scope cti tps person list false
代码:https://codepen.io/anon/pen/gxmWzB
github: https://github.com/xpepermint/angular-ui-switch
功能类似于bootstrap的switch功能,由于数据绑定的存在,不使用对象中的方法切换,改用watch监听model绑定的值(示例中的enabled),
状态切换触发的函数在监听器中实现
var viewTypeWatcher = $scope.$watch(‘enabled‘,function(newValue,oldValue,scope){ if(newValue === true&&typeof newValue != ‘undefined‘){ $scope.getPersonList(2,0); }else if(newValue === false&&typeof newValue != ‘undefined‘){ $scope.personReach(2,0) } })
标签:new efi github $scope cti tps person list false
原文地址:http://www.cnblogs.com/insight0912/p/7306336.html