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
5 views

Angular ui router onEnterChild?

I have abstract route "registration" that has a lot of child routes. I want to call a method when some of the child routes is called. At the moment i am detecting this in the stateChangeStart event $...
2
votes
2answers
1k views

How to preserve ui-router parameters on browser refresh

am using angular ui-router to manage states of my SPA. I have this route: .state('index.administration.security.roleEdit', { url: '/roleEdit', templateUrl: 'app/...
0
votes
1answer
8 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

Properties on $scope in controllers vs. controllerAs syntax (AngularJS)

I'm working with the Inspinia Admin Theme and have the following Problem. I try to show or hide the navbar based on the current path. The Problem with this approach is that the navbar is hidden ...
1
vote
1answer
25 views

How to change the path from custom directive? Angular

I have the following directive which is a button and trying to change the path when clicking on the button but nothing happens. app.directive('searchAgainButton', function ($location) { return { ...
1
vote
0answers
33 views
+50

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

angularJS multiple Master pages based on Role

The requirement of the application is to show different options based on the Role of the user. Like If role is Admin , the after logging in , the user needs to be shown a master page which has link ...
-1
votes
1answer
15 views

Duplicate controllers, templates because domain models are almost the same [on hold]

I am new to Angular and I need to make single page application with Angular and Typescript. It is small application with 2 views (movies and tv shows), and I have just 2 two main domain models. So I ...
0
votes
0answers
213 views

AngularJS and prevent to encoding url

The problem is that angular encodes url as default when you use special characters like [ ] { } I would like to know how I can prevent browser to encode url like below address: http://www.hepsiburada....
0
votes
0answers
12 views

Angular ui-router catch onBefore event when navigating to external site

catching onBefore events is all and well with $transitions.onBefore(), but it does not work when navigating to some external website, is there an alternative for catching that kind of event too?
0
votes
1answer
49 views

UI-Router Child State For Multiple Parent States

I have a project that requires parent routes that are separated, in order to isolate URLs, controllers and API calls. /boardgames/:id/review/ /boardgames/:id/setup/ The issue I am trying to solve is ...
0
votes
0answers
16 views

Legacy Meteor Methods angular2 UI Router Issue

https://github.com/faizmh/meteor_angular2_router_issues I am trying to navigate from home page to market page. In home page, I tried different variations to transition to market page My target ...
57
votes
11answers
83k views

Clear History and Reload Page on Login/Logout Using Ionic Framework

I am new to mobile application development with Ionic. On login and logout I need to reload the page, in order to refresh the data, however, $state.go('mainPage') takes the user back to the view ...
0
votes
0answers
13 views

UI Router stateParams JSON path

I'm trying to access a specific article by ID from a JSON file in order to display the article details. However, I get the following error: GET http://127.0.0.1:4000/data/inventory.json1 404 (...
0
votes
0answers
25 views

UI-Router ui-sref to current state with new parameter

I have an app that has a location setting which when changed updates currency/ language etc.. This is visible on every page as it's in my parent state. When the location is changed using the below ...
1
vote
2answers
24 views

Passing params into angular directive controller

I have a controller which has some custom UI router resolve params injected: uxgroups.controller('UXGroupStepCtrl', ['$scope', '$rootScope', '$stateParams', 'stepData', function ($scope, $rootScope, $...
0
votes
1answer
46 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
3answers
23 views

Components aren't being injected into my ui-view

I'm just trying to setup a boilerplate for angular 1.5.9 with UI Router 1.0.0. I can display my parent state component within the ui-view, however when I nest states within my parent, my components ...
0
votes
2answers
25 views

Angularjs- how to check child form validity in parent form

I have used ui.router with nested ui-views and I want to check the inner form validity to enable common button used for multiple nested views. Please help me out
7
votes
4answers
6k views

angular-ui-router: resolve on root state

As far as I understand ui.router You have $stateProvider in it you can write $stateProvider.state() you can write .state('account', { url: '/account', template: '<ui-view/&...
33
votes
6answers
28k views

Angular UI-Router How to create a “layout” state?

Given an HTML file like so: <html> <header ui-view="header"></header> <div class="main" ui-view></div> <footer ui-view="footer"></footer> </html> How ...
-1
votes
0answers
14 views

Error using resolve with UI Router => angular.js:13920 Error: [$injector:unpr] Unknown provider: simpleObjProvider<- simpleObj<- EnrichingController

I am trying to use ui router with resolve and it is showing the error message : This is app.js var app = angular .module('CoreServiceApp', ['pasvaz.bindonce','ui.router','ngResource','...
0
votes
0answers
22 views

Detect that URL has been changed by ui-router, not by user?

I have a SPA angularjs application and have tabs within the application. Every click on the tab has different URL. But every time the URL changes, the page has to do something. I have to separate the ...
1
vote
1answer
14 views

How to use interpolation inside ui-sref

I have states like this: .state('portfolio.work1', { url: '/work1', templateUrl: 'app/portfolio/work1.html' }) .state('portfolio.work2', { ...
1
vote
1answer
5k views

Uncaught ReferenceError: $stateProvider is not defined Angular UI Router

For some reason I'm getting this error Uncaught ReferenceError: $stateProvider is not defined even though angular-ui-router.js is being loaded fine. the error in Dev Tools here is my app.js var ...
3
votes
3answers
10k views

UI router Unknown provider for injecting service into child state resolve

Got Unknown provider when injecting service into the child state resolve function. But if defined a resolve in the parent state, it just works. Below there are some sample codes: I defined a service ...
5
votes
2answers
113 views

How can I prevent persistent URL anchor link hash values with UI-Router?

I'm using Angular2 and UI-Router 2 in no-hash mode for a simple app with some anchor links in the menu. For example: https://example.com/blah/blech https://example.com/blah/blech#specifications https:...
1
vote
1answer
29 views

Angular 2 - Child route

Got a problem with angular 2 routing, i try lots of things but i still have error message. I got this url : /project/:projectId . Project page got router-outlet and can have access to this two urls: /...
0
votes
1answer
83 views

AngularJS ui-view not getting javascript file of it's parent page

Initially when the page load all ui-view loaded and works fine But when i change the state ui-view not getting javascript file that loaded earlier in it's parent page.Although ui view gets the css ...
0
votes
0answers
22 views

How can I set an active dropdown item based on current state?

I have created a new directive which creates a nested dropdown menu from a link object in my factory. This is outputted like so: <button class="nav-item-idle" ng-click="vm.toggleDropdown = !vm....
0
votes
1answer
75 views

In the config function inside state how to use factory /service for the custom data properties in angular js

In the below example I have to use service inside roles how to use service and return array value from there Example : .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $...
-1
votes
1answer
11 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 ...
1
vote
2answers
24 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
1answer
24 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
1answer
34 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....
0
votes
1answer
41 views

weird ui-sref behaviour: old params still remain at URL although trying to change

This is my state definition: $stateProvider .state('app.reports', { url: '/reports?param1&param2', templateUrl: 'app/modules/report/views/reports.html', ...
1
vote
1answer
25 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, ...
-2
votes
0answers
17 views

angular 1.5 component-router vs ui-router [on hold]

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
1answer
19 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']) ...
1
vote
3answers
38 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
0answers
26 views
+50

$mdDialog with ui-router

I'm trying to use angular-ui-router ui-views (with nested views) inside an angular material mdDialog, but I cannot find anything on how to achieve that. Is it possible? Or should I use another ...
216
votes
16answers
237k views

Reloading current state - refresh data

I'm using Angular UI Router and would like to reload the current state and refresh all data / re-run the controllers for the current state and it's parent. I have 3 state levels: directory....
0
votes
1answer
23 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
18 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 ...
23
votes
4answers
11k views

How to redirect in a ui-router resolve?

I am trying to redirect inside a ui-router resolve and wanted to know if there is a way to reroute in a router resolver. Currently this does not work as one would think. resolver(auth, $state){ if(...
0
votes
1answer
57 views

Reloading only child state

I have nested UI states. I want to load only child state not the parent state. Child State : $stateProvider.state('app.test', { url: '^/test?search', controller: 'TestController', ...
0
votes
0answers
13 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
0answers
6 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
17 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
1answer
18 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, ...