Questa è la prima volta che cerco di utilizzare ui-router.
Ecco la mia app.js
angular.module('myApp', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("/index.html");
$stateProvider.state('index', {
url: '/'
template: "index.html",
controller: 'loginCtrl'
});
$stateProvider.state('register', {
url: "/register"
template: "register.html",
controller: 'registerCtrl'
});
})
Come puoi vedere, ho due stati. Sto cercando di registrare uno stato in questo modo:
<a ui-sref="register">
<button class="button button-balanced">
Create an account
</button>
</a>
Ma sto ottenendo
Impossibile risolvere "registro" dallo stato ""
eccezione. Qual è il problema qui?