我想在删除 dart-angular 控制器时调用销毁函数。
这是 angular.js 解决方案。
$scope.$on("$destroy", function() {
alert("destroy");
});
我在 Dart 中的尝试
class TestController...
TestController(Scope $scope){
$scope.$on("$destroy",(){
print("destroy");
});
}
这是错误代码
Error!
NoSuchMethodError : method not found: 'destroy'
$destroy or destroy
文字不起作用。任何想法?