Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Show Login-Screen on top, not within ion-nav-view

$
0
0

@ht85 wrote:

Hi there,

my app has an abstract view ("main") with lots of sub-views, that are displayed in "ion-nav-view". In my abstract main controller, I load a class (singleton) into the Scope (let's say it's named "test"). In my MainCtrl, I check if "test.user != 0" (i.e. if user is logged in). If false, I'd like to display a login screen ("welcome"), without showing the side-menu.

How can I achieve this?
When I define $stateProvider.state("welcome") without the abstract state "main", I cannot access "test" via Scope (test has a method for logging in via HTTP). So "welcome" has to be within main ($stateProvider.state("main.welcome")). But

.state("main.welcome", {
	url: "/welcome",
	templateUrl: 'templates/welcome-start.html',
	controller: 'WelcomeStartCtrl'
})

does not work.

Thanks in advance!
Henning

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>