UI-Router evolves the concept of an AngularJS Route into a more general concept of a State for managing complex application UI states. Most notably, it allows nested state/view hierarchies and multiple named views.

learn more… | top users | synonyms (2)

0
votes
0answers
8 views

How to structure my states and routing in ui-router

I´m building a e-commerce site using angular1 and ui-router (1.0.0.beta3). But I´m not sure how to setup this up. This is what I have in mind. const home = { name: 'home', url: '/', ...
0
votes
0answers
20 views

When $stateChangeCancelled is fired?

I have a run block that I show a loading indicator when state change is about to happen, $rootScope.$on("$stateChangeStart", function () { startLoading(); ...
0
votes
1answer
17 views

UI-Router - What is the exact issue for the getting the error as `Maximum call stack size exceeded'

My app have the login page, which require to redirect to another extenal web site. as well I require to use the same login page with another new state name. i have made the required changes, But I am ...
0
votes
2answers
29 views

How to avoid loading all the controllers at run time

I am using require to avoid loading all the controllers at run time. But in my case all the controllers are loaded when application starts.Here is my code App.js define(['angular', '...
0
votes
0answers
8 views

Angular ui router html5Mode false and accented URLs in chrome

I always use html5Mode true when using angular ui-router but for a project hosted on github pages, I can't activate this mode given that no server side redirection is possible. So lets go with uggly ...
0
votes
0answers
26 views

How to handle unknown urls in ui-router

Ok so my problem is that I´m not in control of the links fully (comes from a cms). We have 3 possible types, category, product and cms, so we dont really know if the url "/gear" is a cms or category ...
0
votes
1answer
20 views

ui-router demo project not working with components

wanting to use state based routing I tried the sample project from ui-router here: ui-router demo It works, but only as long as this reference to the pre-release library is made: <!-- ...
0
votes
1answer
10 views

Prevent state reloading when changing states ui-router

I understand this has been asked and answered in multiple posts but I have attempted the solutions and still can't quite get there yet. I have a few components that I'm routing between with ui-...
0
votes
0answers
15 views

$stateProvider and browser refresh

I am new to ui-router. Started experimenting with $stateProvieder. One thing surprises me is that whenever I refresh browser unlike $routeProvider, $stateProvider blanks the whole browser window. ...
0
votes
0answers
9 views

Multi-child states form and autoload child state

I have multiple states with components, something like this: https://plnkr.co/edit/Ah6To1rpQjrMXgtGHZ7T?p=preview What I want to accomplish is: When I get to the index.form state, I would like to ...
0
votes
0answers
31 views

Angular UI-router add state conditionaly

I am using Angular UI-router and would like to add state if user has privilege to view page. Example code, for module1.route.js: (function() { 'use strict'; angular .module('...
0
votes
0answers
25 views

Angularjs - how do i make splice work properly in ui-router?

I'm working on inserting and removing datas from a table using ui-router. I have 3 html files: index.html, 1_input.html, 2_output.html I'm having trouble removing data from table row. Still can't ...
0
votes
2answers
22 views

Issue in getting user details and checking of roles in resolve

I have a app for which I use cookies to store the access token and get the user details by using API getUser(accessToken). Consider a scenario where the user has logged in and I have access token in ...
0
votes
0answers
16 views

How to test Angularjs route's resolve value on component?

I'm using [email protected] and resolve some resource at the route level for one of my component. The component works as expected but my test fails now. Error PhantomJS 2.1.1 (Linux 0.0.0) module ag....
0
votes
0answers
11 views

Angular ui-router can't load on laravel

I have a problem with my Angular Ui-Router on Laravel First on my routes.php Route::get('/', function(){ return View::make('index'); }); and my app.js var app = angular.module('pesanLabApp', ['...
-2
votes
0answers
19 views

Why login view nestes to other view?

Why state 'auth' view nestes to other view? When i go to '/auth', login view nestes to main state. enter image description here $urlRouterProvider.otherwise('/auth'); $stateProvider ....
2
votes
0answers
28 views

Unknown provider: $stateProviderProvider in ui router testing

I'm trying to write test case for the Router in my angular app.I'm using "angular-ui-router": "0.3.1", Below is the setup and a sample test case : beforeEach(angular.mock.module("ui.router")); ...
0
votes
0answers
13 views

Angular - Ui-router - How to make both parent and child controller load

Hi I am hoping someone could help me out. I have these states and my intention is that I want the rootController to be initialised to resolve user then for it load the child controller in this case "...
0
votes
1answer
21 views

angular ui bootstrap modal opened in state, how to close in controller?

Hi there I am trying to create stateful modals, using ui-router and ui-bootstrap, I have the modal opening successfully like this, .state('static.login', { url: '^/login', onEnter: ...
0
votes
0answers
24 views

AngularJs URL with a parameter

Users of my app have a wristband which has an NFC tag. NFC tags can be encoded with a URL, but then I have to use the same URL for all aspects of the app. The user presents the wristband at various ...
0
votes
1answer
20 views

Ionic loader: $ionicLoading.show() issue, loader not getting called on first time

I am having this weird problem with $ionicLoading directive. I am trying to show loader on every state change. .run(['$rootScope','$ionicLoading', function ($rootScope, $ionicLoading){ $rootScope.$...
0
votes
0answers
25 views

Error shows if I enable html5Mode in angular

I am using $stateProvider for routing. If I use $locationProvider.html5Mode(false); then by default error page opens. If I enable html5Mode then in error page then this error message comes. How can ...
0
votes
0answers
13 views

http://localhost/home not resolving where http://localhost/#/home is resolved

I am not able to resolve http://localhost/home where http://localhost/#/home is resolved app.js The following is the app.js file 'use strict'; var sdm = angular.module('sdm', ['ui.router']); ...
0
votes
0answers
18 views

Ui Router 1.0, Pass parameters through ui-sref

In the new [email protected] I'm trying to pass parameters through ui-sref. Example: ui-sref="login({tab : 'client'})" This is not working in the subsequent components controller. ex: ...
0
votes
0answers
18 views

Angular UI Router: ui-sref does not render render the page I'm trying to route to, but it appears in my dev tools

I've been banging my head against the problem for embarrassingly long now. I'm using Angular UI Router to handling the routing in a small personal project I'm working on, and I have a strange issue. I ...
0
votes
0answers
23 views

angularjs cache not working with ui-router

To implement cache I am using RestangularProvider.setDefaultHttpFields({cache: true}); but it works only for the same state, when state is changed using $state.go, cache does not work and all API ...
0
votes
3answers
20 views

UI router cannot resolve state error message

I am working on angular application at the moment, using ui-router and I am getting the following error message. Error: Could not resolve 'static.about' from state 'static' and I am not sure why. ...
0
votes
0answers
16 views

Run controllers only after initialization is complete in AngularJS with angular-global-resolve

I am having a problem where my controllers are running before initialization of my app, and I came across this NPM package that works almost perfectly. The only problem I'm having is the ...
1
vote
0answers
13 views

How to set abstract routes as children of an abstract route?

I am having a problem where my controllers are running before initialization of my app, and I came across this solution. The problem is I have several abstract routes and setting those abstract ...
2
votes
1answer
7 views

Minified files and ui-router

I used ui-router, when the file is not minifed or when I used the already minified file everything is working. But I have a gulp task that takes all the library and minify them using "uglify()" (this ...
0
votes
0answers
9 views

AngularJS with dynamic stateful views / routes

TLDR; Is there any way for me to automatically keep routes from unloading and keep state preserved? I am trying to build a client-side application where I want to be able to keep state (data, in-...
0
votes
0answers
17 views

How to load individual modules in side menu depends on user roles and permission in Angular JS?

I have a side menu like each menu Item is one individual module(ng-app). I am loading this modules using providers in sidemenu (amgularProviders). For that I follow this blog http://blog.fragaria.cz/...
1
vote
1answer
16 views

UI-router throw error as `Invalid state ref`, when adding link to `ui-sref'

for the following route : .state('user', { url:'/user/:userId', templateUrl : 'app/views/pages/user/user.html', controller : 'userController as user', ...
2
votes
0answers
38 views

angularjs cordova base href

trying to set the correct base href value for an angularjs html5 web app to work in cordova initially using $locationProvider.html5Mode(true) with <base href="/">: app works perfectly in a ...
0
votes
0answers
13 views

Response for preflight has invalid HTTP status code 403- ionic app error

Hey getting error mentioned above. It is running fine on mobile but not on browser.preflight has invalid HTTP status code 403. Backend developer says he has coded everything perfectly at the backend. ...
0
votes
0answers
44 views

AngularJs ui-router current state is empty when reload the browser (press F5)

My issue is that when i enter the route in the browser addressbar or press the F5 button i allways redirected to 'workspace' beacause the $state.current is allways empty like this: { name: "", url: ...
0
votes
0answers
20 views

How to reduce the Page load time of angular-meteor based web application in mobile?

I'm developing a web application using angular-meteor 1.x where accesses are almost always from smartphones. On average loading the css and js takes 3 seconds, but the application is only ready for ...
0
votes
0answers
39 views

How to get data from Route or ActivatedRoute when subscribing to router.events.subscribe in Angular2?

I'm trying to get the data from a Router whenever the Route changes but I'm not having success. Here I set the asdf property @NgModule({ bootstrap: [AppComponent], declarations: [ ...
2
votes
2answers
22 views

`ui-route` - not able to redirect and not geting the `url` of current state

In my application I am running a function after route-config. in the function i am checking the login status, and accordingly trying to redirecting to login page. But it's not working, here is the ...
0
votes
0answers
17 views

ui-router - reuse controller and template instance for state

I'm using ui-router and when I switch between one state to another it always creates a new controller and its corresponding html, this is all fine and expected. However in my case there is a state ...
0
votes
0answers
12 views

md-nav-sref not working in md-nav-item

I am using md-nav-bar and can get it to work with md-nav-href. It switches routes when you click on a md-nav-item. However, it does not reflect a) URLs in the browser and b) programmatic route changes....
0
votes
1answer
12 views

How to test `$routeChangeStart` every time to check the user login statsu?

In my app, I require to check the user details, in case if the user is not logged in, then i require to redirect back to /login page. but my try is not working, where should I do this config? my try ...
1
vote
1answer
25 views

How can I check the AngularJS UI-Router state from within another controller?

I'm using Angular's UI-Router as shown below to do URL-routing in my web-app as shown below: $stateProvider.state('myState1', { url: '/state1', templateUrl: 'state1.html', controller: '...
0
votes
2answers
23 views

How can I check the AngularJS controller from within the template?

I'm using Angular's UI-Router as shown below to do URL-routing in my web-app as shown below: $stateProvider.state('myState1', { url: '/state1', templateUrl: 'state1.html', controller: '...
0
votes
0answers
15 views

Angular JS state change injecting and deleting ui-view

I have ui-view which is using same code as other view. After researching some on the articles on stack overflow I have created a new state for my view2 which is sharing controller code with view one. ...
1
vote
1answer
10 views

How can I address the UI Router 1.0 beta 3 error “No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']”

I updated to UI Router 1.0 beta 3. I've managed to update my Angular 1.5 app to use it, but Karma is giving me an error: No coreservices implementation for UI-Router is loaded. You should include one ...
1
vote
1answer
25 views

Project structure for large Angular application?

I am new to angular js I want to create my project structure like this - APPLICATION -index.html -app.js -modules -core -controllers -directive -views -core....
2
votes
2answers
25 views

angular ui-router finding issue on refresh the page

In my application, when auth success, I am redirecting to /users. It works fine, and I am in users page too. But when I refresh the page, I am getting an error as: Cannot GET /users What does this ...
0
votes
1answer
36 views

Take value of textbox from page-1 to page-2 using angular js UI-routing

I am trying to take textbox vale from one Page-1 to Page-2 i amusing below code ..but i am unable to do so. Page-1.html <div > <div style="height: 400px"> <h2>Partial ...
1
vote
1answer
32 views

Changing $scope.variable in $scope.$on function does not update view

I want to listen for route changes and update a $scope variable to reflect the current route in my menu (md-nav-bar): $scope.$on('$routeChangeSuccess', function(event, current) { $scope....