@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