I’m having a hard time understanding how different views are handled in Ionic and Angular. I have the following code:
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('index', {
url: "/",
templateURL: "templates/menu.html"
});
});
With my understanding this should inject the code from menu.html
into the ion-nav-view
tags in index.html
at run-time. However, when the page is loaded, it simply displays index.html
with no injected code.
I have been unable to find specific instructions on each property of state
, making a possible error in my code hard to decipher. I also have found that state
may be deprecated by the latest version of Angular, but Ionic docs explain to use state
so that is what I have been trying to do. Any clarification or resources would be greatly appreciated.