采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
问题补充(选填):请详细描述
你的问题,贴出相关代码或截图,并告知你的操作步骤
上述问题已解决
link:function($scope){
$scope.showPositionList=function(idx){
$scope.positionList = $scope.com.positionClass[idx].positionList;
$scope.isActive = idx;
}
$scope.$watch('com',function(newVal){
if(newVal) $scope.showPositionList(0);
});
};
感谢!我也是这个问题,你这个解决了,我就没想到用watch服务。。
登录后可查看更多问答,登录/注册
基于AngularJS,仿拉勾网开发一个招聘类的移动端单页应用
1.7k 16
1.4k 10
1.4k 9
1.4k 8
1.3k 8
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号