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
1answer
20 views

angularjs ui-router persistant page elements

I am trying to get my head around angularjs and ui-router at the moment, my application is split into 3 layouts basically (Marketing Layout, Authentication Layout & Application Layout). I am ...
0
votes
1answer
13 views

Angular2 - Calling function 'UIRouterModule', function calls are not supported

I'm new in Angular2. This error I'm getting when I import UIRouterModule, referring this ERROR in Error encountered resolving symbol values statically. Calling function 'UIRouterModule', function ...
0
votes
1answer
17 views

ui-router issue with stateParams and routing

So i have 2 routes set up: $stateProvider.state('accounts', { abstract: 'true', url: "/accounts", template: '<div ui-view></div>' }).state('accounts.view', { url: "/:...
0
votes
0answers
12 views

UI-router. Dynamically replace root state's template

I have a root state app which defines master template. I have a need of switching this template with a different one for a certain route: app.run(($rootScope, $state) => { $rootScope.$on('$...
1
vote
1answer
11 views

ui-router Dependency included still getting the error[$injector:unpr] Unknown provider: $stateProvider

I am actually trying to use $stateProvider routing but it gives the error; Uncaught Error: [$injector:modulerr] Failed to instantiate module moduleTry due to: Error: [$injector:unpr] Unknown provider: ...
1
vote
0answers
19 views

Reload not working when passing multiple params in ui-router state

I am using ui-router with parent and child states. My states are defined as below : .state("home.ben", { url: "/beneficiary/:name", abstract:true, templateUrl: "app/ben/views/ben-form....
1
vote
4answers
22 views

Angular.js UI-Router templates are not loading

I'm making a simple Angular Website. For Routing I'm using Angular-ui-router. When I click on Home, About the templates are not loading whereas when I click on Contact the template loads perfectly. ...
0
votes
1answer
15 views

404 page in angular ui-router

I am using ui-router in an angular single page application. I have some routes defined, and I have a specific 404 route like this: app.config(function($urlRouterProvider, $stateProvider){ $...
1
vote
1answer
20 views

angularjs translate display the value of the key in the chosen language

I have the following data in my i18n translation file: "mylist" : { "fruits": [ { "key": "A", "value": "Apple" }, { "key": "B", ...
0
votes
0answers
11 views

How to find out if a sx-sref/state link will return 404?

I dynamically generate links in my application like this: $compile('<a sx-sref="channel({id: \'' + 123 + '\'})">Channel 123</a>') Sometimes though, the state will no longer exist, ...
0
votes
0answers
16 views

MEAN $state works strangely

I am new to mean, and I just build an app, but when running code, angularjs $state work strangely. In my app.js, there is VocBuilder.run(['$state', '$rootScope', function($state, $rootScope) { $...
0
votes
1answer
26 views

force $state.reload with a start from state

I have the following states: 'home.person','home.person.house' I'm in 'home.person.house' and want to hard reload state stating from 'home.person'. According to https://github.com/angular-ui/ui-...
1
vote
2answers
13 views

Angular UI routing loose url parameters after page refresh

How can keep url parameters for state, after page refresh? I have this state .state('App.State', { abstract: true, url: '/App/:param', templateUrl: '/page.html', ...
0
votes
0answers
18 views

Issues with ui-router routing with dynamic url

I have email verification state defined as below, which redirects the state to account if the user is logged in and otherwise it opens up, but the thing is with dynamic params of verification url. $...
0
votes
1answer
13 views

Using Angular 2 RC5 router, how can I navigate, given an ActivatedRouteSnapshot?

Use Case The user can access certain parts of my site without being logged in. If they click a download button and are logged in, the download starts automatically. However, if they click the ...
1
vote
1answer
21 views

Angular ui-router initial state without URL

Using UIRouter in an Angular 1.5 app, I'm having trouble trying to set an initial state for my angular module. I've created a few states without URLs (because I don't need actual routing) and I would ...
-2
votes
0answers
17 views

Angular 1.5 selected md-tabs based on ui-router state

I'm using Angular 1.5 Material Design md-tab with ui-router: <md-tabs md-border-bottom> <md-tab label="Foo" ui-sref="foo"></md-tab> <md-tab label="Bar" ui-sref="bar">&...
0
votes
0answers
20 views

Angular Routing - window popup

In angular v-1.6.1, how can we implement popup windows (in single page application). Currently when I open popup window, it opens complete layout in popup. How can I configure specific routing in ...
0
votes
0answers
38 views

Web application logs out automatically when clicked on button in angularJS

I have an web application where we show a set of values on UI which has button named 'view schedule'. When clicked on 'view schedule' button, we make a redirection to viewSchedule controller which ...
0
votes
1answer
32 views

open page in new tab using angular js ui-router on right click

$stateProvider // Home route .state('dashboard', { url: '/dashboard', views: { '': { templateUrl: 'views/dashboard.html' , ...
0
votes
0answers
23 views

Controller is undefined in StateProvider [duplicate]

I am using Ionic to make an app and it can't seem to find my controller. I am unfamiliar with $stateProvider, here is what I have: routes.js angular.module('app.routes', ['app.controller']) ....
0
votes
0answers
20 views

“new” URL slug for state with null parameter

Let's say I have a CRUD app with a state tree that looks roughly like this: main main.tasks (state for listing existing tasks) main.tasks.task (state for editing or creating a task, depending on ...
0
votes
1answer
10 views

UI router | suspend a transition | onBefore

How do I cancel a transition in an onBefore? This snippet probably can illustrate my intention: $transitions.onBefore({}, (trans) => { console.log("before a transition"); console.log(trans)...
0
votes
1answer
13 views

<ui-view> doesn't show me the default template

I'm new to AngularJS. I'm using maven and Spring MVC + AngularJS. Before AngularJS I used to use Spring form so I'm migrating now from Spring forms to AngularJS. The problem I'm facing is that I'm ...
2
votes
0answers
29 views

Handle children item using tab

I have a page with a principal menu that contains a Notification item. When I click on that item, it open another breadcrumbs menu underneath that hold two item: send and status. I want to be able ...
0
votes
0answers
17 views

Cancel a $transitions change ui-router

I am trying to cancel a $transitions change under certain conditions using ui-router. In my run block, I have the following code: $transitions.onStart( { from: 'createCatalog.previewStyles'}, ...
1
vote
1answer
23 views

How to get current route within resolve function?

I have a service which checks whether the current user has access to the route. I would like that service to be called as part of the resolve, so that the view never loads if the user should not have ...
-2
votes
0answers
12 views

Alternative to gulp-angular-embed-templates that also processes ng-inline elements?

I already use this tool to inline template files as strings in my angular 1 components (instead of referencing them through templateUrl: ) but when the inlined template contains an ng-include element ...
1
vote
1answer
49 views

How to fix yyyy is not a function when changing pages in Angular?

I have an Angular app that uses Videojs plugin to add markers on video. Everything works, except when going from one page to another, I get the error: player.markers is not a function. It works again ...
0
votes
0answers
16 views

UI-Router | parameter | URL | object property

Is there a way to have the URL constructed from a property of an object passed as parameter? Something like this maybe: { name : 'survey-detail', url : '/:survey.id', params : { ...
0
votes
3answers
39 views

Angular resolve in component

I have an ui.router state in which I need to resolve some data, but it seems to resolve after loading the controller and before loading the template. State definition looks like: $stateProvider ...
0
votes
0answers
20 views

ui-route have three states setting a route and how is it done?

so basically, I'm trying set up a app function where you click on a user profile and you go to that profile then on that profile there a link that goes to the user photo gallery. how would I set this ...
0
votes
2answers
33 views

ui-router not loading template

I am trying to implement a simple ui-router, I am probably missing something simple, but I cannot see where my mistake is, I have this in my app.js angular.module('tourOfHonorApp', ['ui.router']) ...
0
votes
0answers
13 views

Can I still use `gulp-ng-html2js` for an angular app using `ui-router` and `ng-include`?

I am trying to study the content at https://www.npmjs.com/package/gulp-ng-html2js... and it recommends the code below to fill in the Angular template cache, and prevent loading the html templates via ...
0
votes
1answer
23 views

controller and template of child state is not getting invoked. Transitioned from sibling of child's parent state

I am new to angular js and ui router. i am planning to design a angular js ui routed app. I have a two states, state A and State B. State B has child state. on the landing page of the app (which is a ...
2
votes
1answer
30 views

Angular-ui-router causing infinite loop

I'm trying to learn angular with this tutorial https://thinkster.io/tutorials/mean-stack/wiring-everything-up and I've hit a snag where opening the application runs into an infinite loop of calling ...
0
votes
1answer
32 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
3answers
36 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
18 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
1answer
71 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) ...
1
vote
2answers
25 views

ui-router 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), ...
0
votes
2answers
28 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
0answers
27 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 ...
0
votes
2answers
33 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
1answer
17 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
0answers
71 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
2answers
68 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
32 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 ...
-1
votes
0answers
31 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 ...