I have a webview template which loads data from a link. So, if I have to load a separate webview I use the same template and controller and change the link. It works fine for most cases. However, if I try to load a different webview from the current one it does not work. The reason is that the controller is not triggered again as we are loading the same view. I tried navigating a different page and then moving to webview template, however the result is the same the controller is not initialised. How can I trigger the controller or have the controller reload?
I tried setting cache to false globally and setting reload to true however it still does not reload the controller. Here is how my code looks
.state('webView', {
url: '/webView',
cache: false,
templateUrl: 'templates/webView.html',
controller: 'WebViewCtrl',
reload: true
});
I have also set
$ionicConfigProvider.views.maxCache(0);
However, my controller still refuses to reload. Any ideas on what am missing?