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

Loading an Angular State on selection of each Tab from Bootstrap

I have a module with multiple states which look like below: (function() { 'use strict'; var maintenancePortabilityModule = angular.module('maintenance.portability.module',['ui-router']); ...
0
votes
1answer
18 views

Angular ui Open Modal Automatically on load page

angular-ui-modal]1 for create my site and I want to show my modal automatically when the user enter in my webpage. With ng-click is easy , I have this code: var app = angular.module('app', ['ui....
0
votes
2answers
27 views

Push parameters to URL in angularjs

I am making an angularjs app and I have to push user's company name to url. For example, www.myapp.com/samsung or www.myapp.com/toyota. My strategy to achieve was that first retrieve user's company ...
0
votes
1answer
48 views

Angular Slider using $http and ui.router data not changing

I am creating a basic slider using HTTP service from a local JSON file. Everything works if I don't use ui.router, when implementing ui.router, routing is working but the slider(next, previous button) ...
0
votes
1answer
16 views

Angular UI Router Transition HookMatchCriteria not working

My run block is as follows: angular.module('app', [...]).run(['$transitions', '$state', 'EmployeeService', ($transitions, $state, EmployeeService) => { $transitions.onBefore( { to: 'app.*' }, () ...
0
votes
0answers
19 views

What are the possible reasons for $templateCache to not work?

I am using grunt ngtemplates as part of my build task. It is producing a logically correct templateCache.js file. This file then concats with other scripts to give a concat/scripts/scripts.js file ...
1
vote
1answer
18 views

ui-router 1.0.0-rc1 onEnter hook fired multiple times

I'm migrating my app to ui-router 1.0.0 and I have this issue with nested states, when onEnter $transitions hook fires as many times, as many parents the state has (i.e. how deep it is nested), ...
1
vote
2answers
71 views

Angular UI Router 1.0.0 - prevent route load with $transitions.onBefore

I upgraded to UI Router 1.0.0, which has changed from .$on($stateChangeX to $transitions.onX( (see $transitions here). I need to resolve the user's profile and their access BEFORE navigation to the ...
0
votes
2answers
32 views

Routes When Importing Not Working

I am currently attempting to add routing to my Angular 2 project. All of the components work, but when I add 'appRoutes' to my imports on app.module.ts , an error gets thrown saying Uncaught ...
0
votes
2answers
23 views

remove slash from $location.url() in angular

I need to get the GET params from url and pass it in the links to view in angular I got from location.url() => "/?x=1&b=2" but I need to get = > "?x=1&b=2" without slash I tried to do ...
0
votes
1answer
16 views

why is $state.current a blank object in angular controller

I am trying to implement a component controller that uses the current state from the definition within ui-router config. I'm using angular 1.6.1 with ui-router 0.3.2. What I'm observing in debugging ...
0
votes
2answers
26 views

Using angular 1.6.1 and angular-ui-router 0.3.2 make resolve issues

This is my module: > (function () { > 'use strict'; > > // CREATE module > angular > .module('home', []); > // Module's CONFIG > angular > ...
0
votes
3answers
36 views

Angular-ui-router not loading views

I've worked with Angular before but it's been a while, so I'm a bit rusty. I can't seem to get Angular ui-router to load the html templates for any of my states. This is a very simple app; it does not ...
0
votes
0answers
32 views

AngularJs Ui-routing transition superseded

i find the solution AngularJS and UI-Router: 'Error: transition superseded' during angularjs unit tests but this not work for me. AngularJs version v1.6.1 Ui-routing Version v0.3.2
0
votes
1answer
78 views

AngularJS one page with multiple states

I'm developing an angularjs application using angular-ui-router. There is a page that lists items, thats are filterable by name, and it shows in the url like /items?name=foo. There is an other page, e....
0
votes
3answers
30 views

How to add data dynamically on the right sidebar of my web application depending on the page the user is currently in?

I have developed a web app in angular.js. My question is that I have the menu on left sidebar that remains constant. However, the data on the right sidebar changes depending on the page that the user ...
0
votes
0answers
40 views

How do I get AngularJs UI-Router to load components for AngularJs 1.6.1 app

I have followed the documentation on the UI-Router site to the point that my code for configuring the $StateProvider is practically identical, but I cannot get my Components to load. I am able to see ...
-1
votes
0answers
30 views

Requirejs does not load after refreshing the page [on hold]

I am currently using angular 1.6 and ui router along with require.js. When accessing root url and route to different states, page loads successfully. However, when I am in a specific state, i.e. "/...
0
votes
1answer
25 views

Angular re-routing from one state to another

When a user attempts to visit my home page, I want to be able to redirect them to a different state based on query params. For example, if URL is: http://example.com, then load the home page. If ...
0
votes
2answers
21 views

angular ui-router child state resolve overwritten by parent's

I have two states var books = { name: "books", url: "/books", component: "booksComponent", } var specificBook = { name: "books.specific", url: "/{Id}", component: "...
0
votes
1answer
25 views

Angular view is blank of object that return of a $http.get request

I'm getting data object from a API via $http.get(). This is my angular controller: angular.module('supernovaWebApp',['ui.router']) .controller('professoresCtrl', ['$scope', '$http', function($...
0
votes
0answers
9 views

How to create Angular2 library with multiple routes?

I'm pretty new to Angular2 and I have a requirement to build a reusable library which will be consumed by multiple applications as a html tag. This reusable library will have multiple pages like ...
0
votes
1answer
11 views

Custom Single Sign On using Angular.js

I have 3 websites developed upon Angular.js 1.5.8. Now, I would like to connect them to one single sign on web application and manage their authentication from one place. Without using any external ...
3
votes
2answers
18k views

AngularJs ui-route “could not resolve state” error

Im new to AngularJs and I'm trying to get this ui-route working but no luck. This is a snippet of my .js file containing the route configure. //object for routing var route = angular.module('route', [...
0
votes
0answers
13 views

angular module reference in webpack bundle lead to exception

I am testing Webpack with a simple angular application and I use angular-ui-route by importing its default module. When I bundle the application the name of the imported ui-router module and the one ...
1
vote
3answers
2k views

Angular 2 routing

I searched the net to get an example of angular2 router that changes browser urls. All examples that are there doesn't change browser urls when we change different routes. Can you give me a small ...
0
votes
1answer
21 views

What is the role of $state.go('.')?

I am unsure about the behaviour of state.go with '.' parameter. Does it reload the current state?
0
votes
0answers
22 views

Why to add PARTIALS in angular JS and spring MVC?

I am working on a demo project for myself and i was testing the PARTIALS option in ANGULARJS. When i add partials in my templateURL the link works even if my pages are not in folder partials(there ...
0
votes
0answers
16 views

AngularJS access restriction using $transitions.onBefore()

I'm trying to redirect unauthorized users from 'app.*' states to 'login' state, but I get into infinite redirection loop because I don't know the correct syntax to excule 'login' state. Considering ...
0
votes
1answer
37 views

what's the difference between child state and sticky state?

I have a good use of angular 1.5 states (nested states, tab states, modal stats) Ui-router-extras has sticky states, but I dont see the difference with a classic parent/child state architecture ? ...
0
votes
0answers
24 views

What does 'abstract:true' mean in ui-router?

abstract: true is often used along with url:' ' What action do they perform and why are they used?
6
votes
1answer
203 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
1answer
53 views

AngularJS - UI Router - flickering after check login

i have this problem with angular: i have in my router system a control to the user's authentication. The code below: // ROUTING function config ($stateProvider, $urlRouterProvider, $locationProvider) ...
0
votes
1answer
19 views

ui-router and multi nested views/states?

I'm having trouble doing nested views with ui-router. Currently I can go one level deep: /pages/:page by doing the following: .state('genius.pages', { url: '/pages/:page', views: { '' ...
0
votes
1answer
30 views

How to resolve Angular Service directly from an Angular Component

I am currently using Angular 1.5. I am using ui-router as my primary navigation mechanism. I am leveraging Angular components. I understand that I can use .resolve on my states to instantiate ...
3
votes
1answer
59 views

Angular Hash versus Hashbang

Why does Angular sometimes use a hash in the URL and other times use a hashbang? I've started writing two Angular apps from scratch. Neither are using HTML5 mode. Both have the same default route. ...
1
vote
0answers
23 views

UI-router stateParams cloning objects?

I have this route: { name : 'myPage', url : '/myPage', views: { '@': { component: components.MyComponent.name } }, params: { turtle: {y: 2} }, resolve : { turtle:...
0
votes
1answer
46 views

Angular directive not working if loaded with RequireJS

I have a directive that works correctly when RequireJS is not used, and I'm trying to migrate it to an application based on RequireJS. The directive wraps an Angular UI modal, and uses transclude to ...
0
votes
0answers
19 views

How to achieve a snappy, cascading UX via AngularJS + ui-router

root / | \ / | \ / | \ header content navbar | | library (abstract) / | \ / | \ / | \ ...
0
votes
0answers
42 views

Error: Could not resolve 'bedroom.bed' from state '' (Foundation, Angularjs)

I am new at angularjs and I have the problem that a link is not working. I'm getting this error message: "Error: Could not resolve 'bedroom.bed' from state ''". in index.html: <a ui-sref="bedroom....
0
votes
1answer
17 views

$httpBackend.flush() causing Route Change

I have recently updated my Angular application from 1.5.8 to 1.6.1. In tests, $httpBackend.flush() started changing routes and broadcasts the '$routeChangeStart' message which started calling the ...
1
vote
1answer
20 views

child state resolve injected in a parent controller

I have this state confg : function routeConfig($stateProvider, $urlRouterProvider) { $stateProvider .state('projects', { url: '/projects', template : '<ui-view ...
0
votes
1answer
17 views

[Angular UI-Router]: Refer to named view of current state

As described by the UI-Router documentation you could use relative and absolute names to refer to a named view. In short: .state('contacts.detail', { views: { // Absolutely targets the '...
0
votes
2answers
39 views

Cannot modify $stateParam parameter in controller

I am redirecting into a state using $state.go('someState', {'param':true})and as you can see I am also modifying a flag as it happens. However when I try to switch the flag back to false via $...
2
votes
1answer
103 views

offset ui-router autoScroll

I am using ui-router's autoScroll to scroll down to a div (ui-view) when page loads/route change. It currently does so. Is there any way to offset autoScroll? I need to leave 100px above the element ...
0
votes
0answers
21 views

AngularJS 1.x Multiple named and nested views needles refreshing

I'm trying to create a multi-viewed page with states, and when changing the url (for example: studentDetails) only a single view changes and the others stay the same. I almost made it, but when ...
0
votes
1answer
15 views

Regex to extract angular path without forwardslashes

I have following routes in my angular app: #/categoryevents #/categoryevents/event/5 #/categoryevents/event/5/3 or for example: #/events #/events/get/5 #/events/get/5/3 I need regex to extract ...
9
votes
3answers
20k views

How to detect if a user clicks browser back button in Angularjs

I have a form-like page with some data. And want to show a popup/alert when a user clicks the browser back button, asking "if they want to go back or stay on the same page". I am using angular-ui-...
0
votes
1answer
22 views

Selecting element generated by Angular using JQuery

Below is a snippet of my code: <body> <div class="body" ng-view></div> <div class="footer" ng-view="footer"></div> </body> The following HTML is being added ...
1
vote
3answers
33 views

How to set default value for state params using a service?

I have a state with a param like, .state('statename',{ url : 'emp/:empId', ... ... } This will show the employee details for the given employee id. I want to show the logged in user's ...