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
2answers
12 views

Ionic: reloading current child state from side menu causes loss of header

I'm creating a simple Ionic menu app and I would like to reload the current state from the side menu.Here's a Plunkr to illustrate the problem. In the 'Search' state, the current time is displayed. ...
4
votes
1answer
95 views

How to implement RouteReuseStrategy shouldDetach for specific routes in Angular 2

I have an Angular 2 module in which I have implemented routing and would like the states stored when navigating. The user should be able to: 1. search for documents using a searchformula 2. navigate ...
1
vote
2answers
58 views

Angular 1 Material FAB inside Angular 1 component not sticking bottom right

On my main page I had this with Angular 1 Material with ui-router: <body layout="column"> <md-button class="md-fab md-raised md-primary md-fab-bottom-right" aria-label="Add Test"> &...
11
votes
3answers
12k views

How might I move AngularJS Routes into separate file

I was curious if anybody was familiar with separating routes from the main app config function. My route list is getting quite large and I wanted to move them into a separate file and load them into ...
-1
votes
0answers
21 views

Parameters in Angular2 ui-router

I work with angular2 and ui-router (https://ui-router.github.io/docs/latest/modules/ng2.html). I use the stateService in order to move from a state to another in typescript code. How can i get passed ...
1
vote
2answers
447 views

AngularJS and UI-Router: 'Error: transition superseded' during angularjs unit tests

I'm attempting to create an authorization package for a project of mine. I'm getting the error 'transition superseded' during my unit tests, and I can't find out where that would actually be. Unit ...
1
vote
0answers
27 views

Capture redirect route with guard in Angular2

I'm having trouble capturing the original navigating route using a guard in Angular 2. My site consists of a core module protected by an authorization guard, and a login page that's unprotected. The ...
0
votes
2answers
34 views

Why do I have an 'failed to initiate app' error because of jQuery?

I am using angular and I am getting the failed to initiate app error as it seems because of my jQuery script. I have no idea what is causing it. I included script tags for angular, jQuery, ui-router ...
64
votes
1answer
34k views

How to delete '#' sign in angular-ui-router URLs

I'm using the angular-ui-router library and I have a problem with URLs. I have the following code: app.js: app.config(function ($stateProvider, $urlRouterProvider) { $stateProvider .state('...
0
votes
0answers
5 views

UI-Router Unit testing for a state to be redirected, receiving 'error: transition superseded'

I'm attempting to unit test the following angularJS run function: export default function run($rootScope, auth0Service, $state, lock) { $rootScope.$on('$stateChangeStart', function(event, ...
0
votes
0answers
13 views

Angular 1.6 Routing Error Causing Iteration Recursion Blow up

This question has been asked before here, but for me it still has not worked. My module has the following code: myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $...
86
votes
7answers
109k views

`ui-router` $stateParams vs. $state.params

With ui-router, it's possible to inject either $state or $stateParams into a controller to get access to parameters in the URL. However, accessing parameters through $stateParams only exposes ...
1
vote
1answer
134 views

add angular ionic views and routes after app has initialized

I'm slightly new to Angular JS. I'm using it with Ionic and Phonegap to create a mobile application. This application has views injected into the application by a web server. I would therefore need ...
7
votes
3answers
5k views

UI-Router Multiple Views Single Controller

Is it possible to have multiple views [https://github.com/angular-ui/ui-router/issues/494] with a singleton controller? Use case: I have a ui-view=header and ui-view=content. I change the header ...
0
votes
1answer
19 views

How to clear ui-router hash on page change?

I'm using ui-router 1.0b3 with angular 1.5.x. Also using html5Mode(true). The hash's are not being used for the paths, they are just for the specific page it goes to. I want to be able to go to ...
0
votes
1answer
23 views

Angular 1.5 - Ui-Router 1.0.0-beta.3 - No template configuration specified for 'resolve@root''

So I'm trying to get UI-Router's resolve method to work but I keep getting this error and I have not been successful in resolving this issue. Error: No template configuration specified for 'resolve@...
0
votes
0answers
24 views

in ui-router resolve: object in $stateParams ($stateParams.post) === undefined, but it exist and displays when I console.log

.state('post.modal', { url: "/{postId}", params: { post: null }, onEnter: ['$stateParams', '$state', '$uibModal', '$resource', 'Post', function($stateParams, $state, $uibModal, $resource, ...
0
votes
1answer
26 views

angular js UI Router sending params in URL

I have a state in my config.js which looks like this: state("link_redirect", { url: "/link-redirect/", controller: "LinkRedirectCtrl", ...
1
vote
2answers
33 views

Can't store data of a multi step form built using Angular.js UI Router

I can't store the data user enters on my form. It is multistep form, with each section included as a view using Angular UI router. I have logged the object that is supposed to store data, but it is ...
0
votes
0answers
12 views

Redirect a state to an abstract state's child with UI-Router in AngularJS throws Intercom error

I am re-structuring a state into an abstract state with a child that contains many nested views. I need to preserve the oldState, and my goal is to have any reference to oldState redirect to 'app....
-3
votes
0answers
41 views

How to Display a progress bar in single page application?

I need to show a progress bar on top of the page whenever user click on link What I need to add in my app.js file which is given down below to make use of pace progress bars? var routerApp = ...
1
vote
2answers
32 views

angularjs with ui-router, states getting confused

I have 2 states; viewOrder and saveOrder. Their definition looks like this: $stateProvider.state('viewOrder', { url: "/orders/:orderNumber", templateUrl: 'tpl/orders/view.html', ...
0
votes
1answer
28 views

angular ui-router resolve if params set

I would like secure my route access by redirect the user if no params send. to prevent direct url access. I can do that in my controller but i have in my resolve some web service call. the goal is to ...
0
votes
0answers
16 views

Redirection issue with URL parameter with ADAL.js and UI-Router

I configured the state which contains url with url parameters like this: url:route/:id1/:id2:id3 with ADAL js. When I hit url with route/1/2/3, after login, I am redirected to route/:id1/:id2/:id3?id1=...
0
votes
1answer
29 views

controller is not called as expected in $stateprovider

I have used $stateProvider in my angular application for routing. Prob I'm facing here is, on logout I could navigate to login page,but the login controller is not getting reloaded as expected. Please ...
2
votes
1answer
1k views

AngularJS ui-router: receive an event every time a user goes to a state

I need to receive an event in AngularJS ui-router when the user goes to a state, even when they go to that state twice in a row (i.e. clicking the same url twice). For example, in this plunk, you will ...
0
votes
1answer
77 views

Angular-ui-router 0.3.2 doesn't work correct with components

0.3.2 is a new version of ui-router ui-router releases I have tested it and looks like it doesn't work correct. Please take a look this example. Console output - Unknown provider: $uiRouterProvider &...
2
votes
1answer
162 views

Angular UI Router Dependent Component Resolve

In the UI Router sample app there is an example where one resolve object is used in the next resolve. https://github.com/ui-router/sample-app-ng1/blob/master/app/mymessages/mymessages.states.js#L76 ...
0
votes
0answers
17 views

Angular App: Using two domains to point into same app's different states to use as home page

I am planning to build a web application in AngularJS using Node JS and MonogoDB. Here I am confused a little bit, the basic functionality of the app will be: 1. sell used cars by owners on my portal ...
0
votes
1answer
33 views

ui-router html5Mode doesn't like hrefs to static html files

When using ui-router without html5Mode (using hangbang URL syntax), anchor tags that do a full page refresh to other pages (or static html content) using hrefs are working properly. As soon as I ...
1
vote
0answers
18 views

$transition$ not working when injected in a controller / ui-router 1.0.0-beta.3

in the official doc : https://ui-router.github.io/docs/latest/modules/ng1.html , in the example : MyController.$inject = ['$transition$']; function MyController($transition$) { var username = $...
1
vote
1answer
249 views

How to load a component with ui-router using Webpack, Components and OclazyLoad

I'm currently trying to use OcLazyLoad with angular component and ui-router 1.0.0 and Webpack 1. But I can't figure out how correctly show the html view using the views object with ui-view="MainView" ...
0
votes
1answer
19 views

How to share resolve between two views (ui-router)

So, I know I can probably create a service, but this would be a lot cleaner and I feel like it should work. I'm trying to inject the resolve from the abstract view, into each controller but I'm ...
0
votes
0answers
20 views

Not able to access url in salesforce

I have changed the UI in salesforce using angular js and angular material,the url works fine and the routing happens fine when I have logged in with my credentials but the same url when accessed with ...
0
votes
4answers
46 views

AngularJS: How to remove #!/ from URL?

I already have done $locationProvider.html5Mode(true); but it is not working. Whenever I access http://example.com it goes to http://example.com/#!/. Code is given here: var myApp = angular.module('...
0
votes
1answer
28 views

On bootstrap modal refresh keep my JSON data in current modal view

In my Angular app my Bootstrap modal opens up with a custom url, set using ui-router. The problem I have is on page refresh my JSON data gets cleared from my modal and it displays empty. Any help on ...
0
votes
0answers
31 views

How to handle Multiple modal controllers in AngularJS

I have a page that has multiple modals in it. these modals has different functionalities. I want to know how to declare each modals' controllers. should i include them all in the main view? is that a ...
0
votes
3answers
42 views

angular js state provider with dot in url not working

I am using angular js state provider. I want my url like this. http://localhost:8080/state1/state1.html . It says "Cannot GET /state1/state1.html". Here is the code $stateProvider .state('state1'...
1
vote
1answer
14 views

Why content gets populated as a sibling of router outlet in angular2

In ngRoute/ui.router, content gets loaded inside ng-view/ui-view, but in angular 2 it gets loaded as a sibling of router outlet. Why?
1
vote
1answer
25 views

Multiple Named Views in UI Router

I'm asking this to make sure I understand the concept. In UI Router, they recommend you use nested states as much as possible. However, it seems when you do that, you can only have 1 controller per ...
4
votes
2answers
9k views

Can access $stateParams in “view” but not in the controller

I'm going through the AngularUI Router sample app in http://angular-ui.github.io/ui-router/sample/#/ I think I understand in general what is going on and have been able to implement something similar ...
0
votes
1answer
52 views

How to read $stateParms value in Angular2?

Using Ui-Router In Angular1 The stateparam value is coming using $state.params How to do the same thing in ANgular2 I tried like this this._uiRouter.globals.params.id it's working, But its not a ...
0
votes
1answer
22 views

ngUpgrade - routing from ng2 to ng1 - how?

I am using ngUpgrade and I dont know how to handle the routing between ng2 and ng1. If I am in ng2 component, how do I route to ng1 controller? and viceversa. I am using ui-router for the ng1. For ...
0
votes
0answers
21 views

Modularize AngularJS App Using UI-Router

I'm trying to modularize a large AngularJS app (1.4.8) that is using UI-Router. The current structure is like this: transactionApp.config(['$stateProvider', '$urlRouterProvider', '$...
0
votes
1answer
18 views

ui-sref doesn't generate a href, despite of router conf and state in a $scope variable

I am having some problems in understanding where to find my mistake. I have a state stored in a $scope variable. Inspecting the page, I see that the right state is stored in the ui-sref property in ...
7
votes
3answers
7k views

Can a controller inherit scope from a parent controller when using ui-router

I have the following: var admin = { name: 'admin', url: '/admin', views: { 'nav-sub': { templateUrl: '/Content/app/admin/partials/nav-sub.html', controller:...
0
votes
0answers
15 views

Angular ui-router state is saving URL, even after using location to false as option

I want to keep the state NOT bound with URL. Thus, didn't assign URL while configuring state. But I need to change the URL via separate work flow using: $location.path("/blah"); If we call $state.go(...
2
votes
1answer
53 views

'ui-sref' of Angular UI-Router not working as expected

If I am working with href, UI Router works as expected. But, if I am using ui-sref, it is not working as expected. I have two issue with the following example: the anchors 'link-series-2-no-param' ...
1
vote
0answers
24 views

ui-view inside the ui-view

I am creating single page application, when i load the page my index.html will start with login page, in index.html i am using ui-view, login page is load inside the ui-view, and when i logged in home ...
1
vote
1answer
29 views

Show/hide state from sidebar

So I have this states : function routeConfig($stateProvider, $urlRouterProvider) { $stateProvider .state('users', { url: '/users', template : '<ui-view ...