Login page not set while launching app with empty


#1

Hi All,

I am new to Ionic, and i took blank app i.e ionic start myapp blank
bu t i added controllers.js and created login.html in templates and what i have to give state(‘tab’)

.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state(‘tab’, {
url: “/tab”,
abstract: true,
templateUrl: “templates/login.html”
})

$urlRouterProvider.otherwise('/templates/login.html');

Please help on this
Thanks Inadvance
Janardana B


#2

you miss add login page to stateprovider

.state('login', {
url: "/login",
templateUrl: "/templates/login.html"
})

and

$urlRouterProvider.otherwise('/login.html');

#3

Thankyou for your replay

.state(‘login’, {
url: “/login”,
abstract: true,
templateUrl: “templates/login.html”
});
$urlRouterProvider.otherwise(’/templates/login.html’);
i changed tab to login but still it is not working.


#4

Try $urlRouterProvider.otherwise('/login');


#5

Thankyou its working fine