Hi,
I’ve create a skeleton where I need a login/intro page and after click , I go to sidemenu page.
In index.html, I’ve only and into menu I’ve into .
So, if I create app.login state like app.login1 state, my app don’t work because I’ve a blank page and there are any error into console. If I use app.login state as I write here , I see the form page but I think that is not the right procedure that form is into . ( I tried and bad works ).
How solve?
This is my state.
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// ‘starter’ is the name of this angular module example (also set in a attribute in index.html)
// the 2nd parameter is an array of ‘requires’
// ‘starter.controllers’ is found in controllers.js
angular.module(‘starter’, [‘ionic’, ‘starter.controllers’,‘LocalStorageModule’])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', { url: "/app", abstract: true, templateUrl: "templates/menu.html", controller: 'AppCtrl' })
.state(‘splash’, {
url: ‘/’,
templateUrl: ‘templates/splash.html’,
controller: ‘SplashCtrl’
})
.state(‘app.login1’, {
url: ‘/login1’,
templateUrl: ‘templates/login1.html’,
controller: ‘LoginCtrl’
})
.state(‘app.login’, {
url: “/login”,
views: {
‘menuContent’ :{
templateUrl: “templates/login.html”,
controller: ‘LoginCtrl’
}
}
})
.state('app.search', { url: "/search", views: { 'menuContent' :{ templateUrl: "templates/search.html" } } })
.state('app.browse', { url: "/browse", views: { 'menuContent' :{ templateUrl: "templates/browse.html" } } }) .state('app.playlists', { url: "/playlists", views: { 'menuContent' :{ templateUrl: "templates/playlists.html", controller: 'PlaylistsCtrl' } } })
.state('app.single', { url: "/playlists/:playlistId", views: { 'menuContent' :{ templateUrl: "templates/playlist.html", controller: 'PlaylistCtrl' } } });
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise(‘/app/login’);
});