I want to call a destroy function when the dart-angular controller are removed.
This is the angular.js solution.
$scope.$on("$destroy", function() {
alert("destroy");
});
My try in Dart
class TestController...
TestController(Scope $scope){
$scope.$on("$destroy",(){
print("destroy");
});
}
and this is the Error Code
Error!
NoSuchMethodError : method not found: 'destroy'
$destroy or destroy literal is not working. Any Idea?
$scope.$on(r'$destroy', () {(usingr) - Florent