ITPub博客

首页 > IT职业 > IT图书 > ng-repeat = "i in [4]" [4

ng-repeat = "i in [4]" [4

IT图书 作者:ma_ti 时间:2021-09-09 09:05:41 0 删除 编辑

html```


Root scope    
MyEventcount:{{count}}






  • Middle scope   
    MyEventcount:{{count}}


    • Leaf scope   
      MyEventcount:{{count}}




js:
function EventController($scope) {
    $scope.count = 0;
    $scope.$on("MyEvent",function(){
        $scope.count++;
    })
}

输入代码

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/93/viewspace-2799330/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2026-01-07

  • 博文量
    0
  • 访问量
    5411