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

Ui router not working?

My simple router doesnt seem to work, here is my app.js var module = angular.module('ngFirstApp',['ui.router']); module.config(function($stateProvider, $urlRouterProvider) { $stateProvider....
0
votes
0answers
14 views

AngularJS ui-router inserts route in every page

I have two pages http://localhost/page1 which contains ng-app="appOne" in header and ng-app="appTwo" in the body. appTwo uses ui-router to pull forms to enable a multi-step form and displays the ...
1
vote
1answer
27 views

Redirecting state: null is not an object (evaluating 'name')

When a user enters the state cloud, it checks if a current variable is found, and if it isn't, it redirects them to a different state. But for some reason, I get the following error on the redirect. ...
0
votes
0answers
11 views

How to pass ng-repeat object attribute to nycBreadcrumb label?

I'm using ngRouter with nycBreadcrumbs to pass a GUID to another view. The GUID is applied to the resolved URL, but not to the label attribute of the breadcrumb (where the title of the page and ...
1
vote
1answer
16 views

angular-ui-router share states

So I have a few states set up like this: $stateProvider.state('accounts', { url: "/accounts", templateUrl: 'tpl/accounts/index.html', }).state('accounts.view', { url: "/{accountNumber:[A-...
1
vote
2answers
14 views

angular-ui-router and regular expressions for parameters

I am trying to fix an issue with routing getting confused by introducing regular expression to match my route parameters. The path needs to be something like: /accounts/MER005 or /accounts/...
0
votes
1answer
34 views

Load variable in angularJS before before javascript html

I am trying to load a graph in AmCharts. The problem is that the JavaScript script is loaded before I get the service return, it starts empty and I can not update the variable. Any idea how to do ...
0
votes
1answer
24 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
18 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
23 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
31 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
17 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
21 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
14 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
18 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
21 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
40 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
73 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
26 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
30 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 ...