Do I need to “unwatch” scope variables when the scope is being destroyed?

后端 未结 2 1359
忘掉有多难
忘掉有多难 2021-01-11 12:38

Below are the docs from angular. I\'m watching several variables that are part of this scope to build up a filter string for ng-grid. When this scope is being

2条回答
  •  滥情空心
    2021-01-11 13:25

    I also think that this should be explicitely explained in the documentation. I've deduced that unwatching was unnecessary from the angular source code which always ignores the result of scope.$watch (in ngIf, ngShow, ngRepeat, etc.).

提交回复
热议问题