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)

-1
votes
1answer
8 views

UI router - How do i create a nested state

I have a state as the following: .state('main', {url: '/main', templateUrl: 'views/main.html', controller: 'Main'}) What I want to do is have another URL that is /main/details. This will be a div ...
0
votes
0answers
5 views

Angular-breadcrumb: label/parent relationship

I am trying to use ncy-breadcrumb in my application but I don't know how to solve one particular case. First of all I have these 2 states: { state: 'installation-edit', config: { ...
0
votes
1answer
21 views

Can't retrieve params for a given id in Angular

Im building an application in Ionic and I need to display several things from list to details. Basically I have a Homepage that display all my content from a json file, and put it into a list home....
-2
votes
0answers
12 views

angular 1.5 component-router vs ui-router

I am about to build a component-based architecture application with angular 1.5 and I want to know which router to use component-router or ui-router. I know that component-router has some nice ...
1
vote
2answers
18 views

Injecting custom service into ui-router config throws error: Unknown provider: [Service]

I would like to inject my custom service into angular app in ui-router config function. So I'm defining router as below, but when trying to $inject service I get error: Unknown provider: Auth. Here is ...
1
vote
3answers
36 views

Angular ui.router Reload Template

First of all, I'm sorry for a long question, but it just has to be like that. Unfortunately... I have a couple of templates and a couple of routing logic, all linked in separate files. For some ...
0
votes
1answer
22 views

route to specified number of views in angularjs

I am in the process of building a mobile web app with AngularJS. The app will allow the user to record the salary and other figures for employees. On the first page the user will select the number of ...
0
votes
0answers
16 views

ui-view shows data on first click of a tab but fails to load the same data on subsequent clicks

I am using angular 1.5.I am trying to load two templates called roles.html and applications.html. The page get loaded on first click of applications tab or roles tab in nav-bar,but fails on subsequent ...
1
vote
1answer
18 views

AngularJS UI-router Change the parent template url from client state

I'm using ui-router for my routing. I would like to know how I can dynamically change the parent templateUrl from a client state (edit state in this case). angular.module('TestModule', ['ui.router']) ...
0
votes
1answer
12 views

.htaccess rewrite the index page of an angular.js application

I'm having some problems with my angularjs applications index page. Whenever I enter www.example.com I simply get a white page where ui-view is supposed to fill up the page. However, whenever I enter ...
0
votes
0answers
11 views

browser back button breaks , angular ui-router

I am using angular 1.2.26 . I am doing statefull routing in hashbang mode. $urlRouterProvider. otherwise('/comments/'); var comments = { name: 'comments', url: '/comments/:...
0
votes
1answer
17 views

Not able to use UI-Router in AngularJS 1.x with query params

I am using UI-Router with AngularJS 1.5.9 and I try to handle the route '/reregister' with a query parameter in it. I try to invoke this URL form outside (by a link): https://myapp.herokuapp.com/#/...
0
votes
0answers
5 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: <md-button class="md-fab md-raised md-primary md-fab-bottom-right" aria-label="Add FooBar"> <md-icon>add</md-icon&...
0
votes
1answer
16 views

angular-ui route won't load controller

.state('app.match.indicator.speciality',{ url: '/speciality/:jobId?', views: { '[email protected]':{ templateUrl: ENVApp + '/views/match/match....
0
votes
0answers
15 views

UI-Router, default child didn't working

I want to have a parent page html, that has the controller shared by it's child view. Here is my routes.js export default function routes($stateProvider) { 'ngInject'; $stateProvider .state('...
0
votes
0answers
16 views

Not able to type in Input on IE11

I'm not able to type in Input on IE11 with a very specific scenario and not sure if this is an IE bug or anything to do with libraries I'm using: angular, angular-ui-router, recaptcha. JSBIN Demo: ...
0
votes
0answers
10 views

Dynamically loading component in AngularJS 1

Angular 1 has introduced the idea of components, and ui-router 1.0 allows you to specify a component for a particular state. But say I want to show in a new component dynamically, _not as a new state)...
0
votes
1answer
17 views

Angular 1 Ui-router - transition to next child sibling

I can't quite work out from the documentation on ui-router about how to transition between sibling states effectively using $state.go() Consider a child state whose url is integer based: /parent/1, ...
1
vote
1answer
18 views

Angular UI Router - Prevent re-running of parent state when switching between children

I currently have a state hierarchy in my application like so; - module_base - page_base - tab_one - tab_two - tab_three The page_base state is abstract and has a ...
0
votes
1answer
12 views

Issue with optional params on ui-router

Here is my route : .state('befyne.front.pages', { url: '/:rubrique/:sousRubrique/:pageSlug', templateUrl: 'components/frontoffice/pages/views/page.html', controller: 'FrontPageCtrl', }) ...
0
votes
1answer
46 views

After refreshing page how to store $stateparams param value in Angular Js?

In button click event my state is going to change from one state to another.thats way I am passing Id value by using ui-sref. this is my button declaration for id:- <button ui-sref="list({id:...
0
votes
1answer
20 views

AngularJS 1 approach for “new foobar” UI overlay

I'm using AngularJS 1 with angular-material and ui-router. Does anyone know what the best practice is for providing a UI for some "new foobar" type thing? In other words, let’s say I have a ui.route ...
0
votes
0answers
17 views

Angular ui-router - Two way binding for objects in resolve in parent/child states

I'm stuck with a particularly bad inheritance issue. Essentially, ui-router will two-way bind data that is passed to a child state from its parent via resolve. Works great. However, if (from the child ...
1
vote
1answer
14 views

Angular-ui-router templateUrl not working with Chrome and IE, but works for Firfox

Created a very simple Angular ui-router files to test, I found out "templateUrl" ('contact' state in my example code) in the stateProvider not working with Chrome and IE, but works for Firefox, ...
0
votes
2answers
31 views

want to remove # from my angularjs application

want to remove # from my angularjs application i have tried $locationProvider, but there is no luck here is my Config : var TechdefeatApp = angular.module('TechdefeatApp',['ui.router']); ...
0
votes
1answer
27 views

Angular2 nested module routing with same routes

I'm facing a common problem in a backend app. I got several ressources which can be viewed by consulting this kind of routes: reports/view/:id campains/view/:id suts/view/:id certifications/view/:...
0
votes
1answer
22 views

Angular: How to combine usage of cache and ui-router resolved promises?

For an angular app, I was previously loading all data before displaying any page through the ui-router resolve. However, certain data was repeated, so I ended up caching the data via localStorage... ...
0
votes
0answers
21 views

Angular Ui Router Parent with Multiple Children Controller As

Say you have a parent state like this: .state('app', { url: '/app', abstract: true, templateUrl: '/App/Views/App.html', data: { requireLogin: true } And the template is ...
0
votes
0answers
16 views

Confusing with hashchange event and $stateChangeStart in angular.js

$rootScope.$on('$stateChangeStart', function(event, toState , toParams, fromState, fromParams) { if(toState.params.isRestricted === true && !$rootScope.isAppLog ) { ...
0
votes
1answer
21 views

angular best practice: folder structure, components, ui-Router

I am new to angular and I need someone to point me in the right direction preventing me from learning bad angular practices. I know there are similar questions around but I could not find the general ...
2
votes
4answers
46 views

Remove DOM-Element with AngularJS

I'm trying to remove a navbar based on the current location path. This is what I have so far: angular.module('myModule') .controller('MainController', function ($location, $document) { if ($...
0
votes
1answer
28 views

How to change params value during transition?

During transition I would like to be able to change params values. In documentation I found a method to access target states params using params('to') method. In my code it looks like this $...
0
votes
1answer
47 views

Cannot Display Object Contents - AngularJS

I am trying to make an app that will display the job details in the modal window, depending on the template that is selected. For this I have combined ui.bootstrap and ui.router . But for some reason, ...
0
votes
0answers
15 views

How to remove/delete or skip a state in angular

I am trying to skip a state after logout in angular ui router SPA. But I am unable to acive this. dashboard -> login -> view details -> logout -> dashboard I am logging in dashboard and moving to ...
0
votes
2answers
24 views

Could not resolve 'state1' from state 'state2'

Im transitioning from one state to another using $state.go() like below: $state.go('menuItem.list'); This causes following error. Could not resolve 'menuItem.list' from state 'branches.view' ...
0
votes
0answers
14 views

why I can't reach the nested state when I use ui-route

I just started to use ui-route. The first level states work fine, but the nested state didn't work. This is my index.html <body ng-app="funtownApp"> <div> <h1><a ui-sref="home"&...
0
votes
0answers
21 views

ui-router how to set default state and “not found (404)” state

I am migrating to ui-router in Angular 1.5 and I need to setup the state provider so when I enter the base URL for my app it goes to my home state, but if user enters some non-existing path, it shows ...
0
votes
1answer
18 views

Ionic route from template html, to other page

I want to make a button in a partial view tab-suggestion, that directs to a other view called tab-profile. The problem is that href="#/tab/profile" doesn't do anything. The links in the tabs nav work ...
0
votes
1answer
9 views

Bootstrap ui-router states programmatically

I'm working with angular 1. I want to load some data from server before ui-router bootstrapping all the states. Is it possible to do so?
0
votes
1answer
25 views

Redirect user to home page if type not existing url

I need to redirect "logged in" user to home page if user type not existing url. I have a service named "authService" where I can check if user auth == true or false. I use $STATE.GO to redirect to ...
0
votes
0answers
29 views

How to append the same template twice within another template - Angular 1.5

I am an Angular newbie. Using Angular 1.5, I have a main template with a button. ui-sref on the button is linked with a ui-router that loads an image (another template). My requirement is to keep ...
2
votes
0answers
34 views

Angular Material layout breaks when using UI-Router

I´m using Angular Material 1.1.0 with UI-Router 1.0.0-beta.1 in my Angular 1.5 project and UI-Router seems to break flexbox functionality. The index.html layout stretches and fills the container ...
1
vote
0answers
25 views

ui-router: Transform parameter from URL

Is there any possibility to transparently transform URL parameters? As it's kind of difficult to explain, I will give a scenario. We have a URL structure similar to this one: /shopping/nuts/:...
0
votes
0answers
20 views

Angularjs no predefined routes

I'm playing with angular trying to create some routes without specifying statically the paths I have the following ng-routes now: route .when("path/of/first/file",{templateUrl: "path/of/first/file....
0
votes
2answers
19 views

angular ui-router basic state change

I am new to Angular JS, and I'm learning ui-router. In this basic example I'm not able to configure the routing. The HTML: <nav class="navbar navbar-inverse" role="navigation"> <div ...
3
votes
1answer
28 views

I want to do some operation on $stateChangeSuccess. But It should not be done if I click on browser back button

I am trying to do some functionality on $stateChangeSuccess. $rootScope.$on('$stateChangeSuccess', function(event, toState) { $rootScope.guestNav.push(toState); }); And ...
-1
votes
1answer
23 views

Nested routing with state provider in nested navigation

navigation .state('parent', { abstract: true, url: "/parent", templateUrl: "app/components/common/content.html" }).state('parent.child', { ...
0
votes
2answers
19 views

angular config block not being called

The code inside my angularjs config block is not getting executed. I have already checked the similar questions on stackoverflow and nothing helped me. I have already checked the 2 possible errors. 1)...
0
votes
0answers
14 views

Link to static resource from within angularjs UI-Router

Trying to link to a static resource (read: PDF) from an angular single page app that uses $locationProvider.html5Mode(true);. I can access the pdf by typing in the URL in the address bar, but if I ...
1
vote
2answers
18 views

Refresh Event not working on Firefox browser

I have an application built using angular js with angular ui router. Below is my application URL http://localhost:8082/sample/#/test/1 On click of enter in the browser address bar, the page refresh ...