I am firing the destroy functions to handle destroy of controller.
$scope.$on("$destroy", function() {
alert(0)
});
I have links that calls controller with stateProvider.
<a href ="#/product">products</a>
<a href ="#/categories">categories</a>
when I click products link while working on category page, destroy handler function is firing.
- who is destroyed the controller scope when click another link? stateProvider or else?
- how can I fire controller initialize function like destroy.