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)

9
votes
2answers
125 views

Loading html and Controller from server and creating dynamic states UI - router

I am looking for a Solution to load my App Content dynamically from the Server. My Scenario: Lets say we have 2 Users (A and B), my App consists of different Modules like lets say a shoppingList and ...
1
vote
1answer
37 views

AngularJS state loading

I'm trying to load states dynamically from a JSON file using ui-router-extras. The JSON file looks like the following: [ { "name": "app", "url": "/app", "abstract": "true", ...
0
votes
1answer
32 views

UI to edit a list item within the current template

My UI includes nested tabs (using Bootstrap). The tab in question is a template with its own controller, currently specified on a view with UI-Router: .state('editBase.edit', { url: '/:id', ...
0
votes
0answers
7 views

Multi nested ui-view trouble with ctrls

I'm trying to build an app but I'm experimenting trouble with ui-router. 3 named views I have an unamed view, filled with 3 named view (see deal state). I would like to use the same url to fill ...
0
votes
1answer
66 views

SPA with ui Router Angular JS too many files

This is a conceptual doubt. Recently I began develop a SPA (Single Page Application) using the partial rendering with ui Router (more information about ui router here). But as the application ...
0
votes
1answer
10 views

How to pass data from $state.go() to the data parameter in stateprovider in angular?

I am having trouble passing some data to the stateprovider using $state.go(). Here is the sample code that we have been using. $stateProvider.state('socialform', { url: ...
0
votes
1answer
41 views
+100

ui-router v1.0.0alpha0 - TypeError: Cannot read property 'creationContext' of undefined

I started to test out the new ui-router v1.0.0alpha0 with AngularJS v1.4.0 but I am getting this error: TypeError: Cannot read property 'creationContext' of undefined at ...
1
vote
1answer
12 views

How can I construct an AngularJS state parameter in the view by concatenation?

Using the AngularJD ui-router, I have defined a state myState that takes 3 parameters: stateParam1, stateParam2 and stateParam3. In my view the variables var1 and var2 are already defined. I pass ...
0
votes
0answers
24 views

AngularJS ui-router multiple templates and controllers within a single view

I'm working on an Angular (1.4.8) application using ui-router. The routing makes use of nested views, but I think I've hit a situation where I need to nest deeper but the technology won't permit it. ...
0
votes
1answer
7 views

Reload nested state only not parent with url parameter ui-router

I have a state and a nested state in my app.js file. The parent state has a button that controls what is viewed in the nested state, this is done by setting url parameter and the nested state's ...
1
vote
1answer
24 views

Angular 2 : 404 error occur when i refresh through Browser

I'm new to Angular 2.I have stored my single page application in my server within a folder named as "myapp".I have changed url in base to "http://example.com/myapp/". My project have two pages.So i ...
1
vote
1answer
20 views

Angular js service value does not updates in the view

I'm using the stateProvider, and when the state is changed i want to update my breadcrumbs in the header. Instead of writing for each state its own embedded view, i just put on the service that shares ...
0
votes
1answer
24 views

Resolving AngularJS promise returned by Factory function

I have a factory object that has a getProduct(id) function as shown below angular.module('app') .factory('productFactory', ['$http', 'URL', function($http, URL){ var urlBase = ...
0
votes
0answers
19 views

Ui Router: change state in html with ui-sref not working

I'm new to angular ui-router. I was previously using AngularJs's ng-router and am currently in the process of migrating to ui-router so, sorry if the answer to this question seems really obvious. I ...
2
votes
0answers
36 views

Angular UI Router running footer function when navigating to a state with no footer

I'm building an Angular 1.x app, using ui-router. When I navigate to state 'a', the header, content, and footer load properly. When I navigate away to state 'b', footer.getLabel is running after the ...
3
votes
2answers
87 views

ui-router: intermediate templates

Final Edit: working plunker with the transcluded directive. Edit: I made a first plunker with the solution given in the first answer. It works, but it's not the desired behaviour, because the ...
0
votes
0answers
10 views

Statefull modal as child of root state

I have a problem. I've created a modal state, that is a state for modal and is a child state of a root state. In the root state i have a list of articles in ng-repeat that create a scrollable view. ...
0
votes
1answer
31 views

How to load REST resources in Angular-Seed bootstrap project from a JEE7 back-end

I am trying to learn hot to invoke a RESTful service that I've implemented in JEE7. I am using the bootstrap template Angular-Seed and the file structure in the tutorial I am using looks a bit ...
0
votes
0answers
21 views

Multiple layouts with UI-Router

I have a project for which I need 2 layouts. One which is basically 1 column (kind of as a landing page) and one which has a menu at the top, and is basically the same 1 column layout. I've set up 2 ...
1
vote
0answers
13 views

Is it possible to implement ion-view-nav with our ui-router setup?

I'm having a bit of trouble implementing Ionic's <ion-nav-view> functionality on a hybrid app which uses a shared Angular UI Router states setup. Our states are predominantly defined in the ...
0
votes
1answer
30 views

ui-router activates 404 instead of requested state

I am using WordPress rest API and I have states in my AngularJS app as below: .state('public.blog', { abstract: true, url: '/blog', template: '<ui-view/>', }) ...
0
votes
2answers
19 views

$state.go after a timeout or in $ionicPlatform.ready makes a boolean seem truthy and falsy at the same time

We want to have a dynamic startup state in the our application depending on certain factors (scroll down if you're interested in the context). We have the following code to achieve it: we have a fake ...
3
votes
2answers
38 views

Can I reload app without refreshing view?

I am using UI Router in my application, and I am wondering if I can reload - or destroy services when user is logging out, without refreshing the view? So far, when user is logging out, backend logs ...
-1
votes
1answer
16 views

Why does ngif not remove script tags from my code?

I have a few script tags I want removed on a condition. In the DOM I see that they are not there (they're commented out), but i still see console spew from them. Are the script tags loaded regardless? ...
0
votes
1answer
27 views

how to use ui-router inside a function with static menu without creating default back button

I am using Angular UI router with Ionic. I want to redirect page from one to another within a function. I have default menu in all pages. I tried used $state.go. but $state.go is changing the ...
489
votes
10answers
108k views

AngularJS : Difference between angular-route and angular-ui-router

I am new to AngularJS. I find Angular quite interesting and planning to use angular in my big apps. So I am in the process to find out the right modules to use. What is the difference between ngRoute ...
0
votes
0answers
9 views

How to add the user object to the scope upon auth:registration-email-success using ng-token-auth?

I have this in my registration controller (RegCtrl) module.controller('RegCtrl', [ '$scope' '$auth' '$state' ($scope, $auth, $state)-> ... $scope.$on ...
0
votes
0answers
16 views

How do you protect /handle authenticated routes with ui-router?

Just started using angular and I'm trying to learn as fast as I can. I'm relatively new to SPA's so please bear with me and feel free to tell me if what I want to do is not feasible. What I'm ...
0
votes
0answers
10 views

angular ui router url regex slug parameter not evaluated

I use angular ui router and I have following state with regex slug detection: $stateProvider .state("main", { url: "/{slug:^[a-z0-9]+(?:-[a-z0-9]+)*$}", controller: function($scope) {}, ...
3
votes
3answers
3k views

angular-ui-router: add css class if state matched

simple wiki I'd like to show an edit button in the navbar is state == 'page' v0.2.10 .state('page',{ url: "/wiki/{ns:[0-9a-zA-Z\-/_]+}/{wp:[0-9a-zA-Z\-/_]+}", templateUrl: ...
0
votes
2answers
42 views

ui-router for manual parsing URL without using views

I want to watch a location and run a function when the location changes. I also want to be able to easily change locations by running a function. I want to be able to use the browser back buttons. ...
-1
votes
4answers
152 views

How to retrieve mongodb data from server (node.js) to my AngularJS Route

This is my Server.js file (NodeJS): var express = require('express'); var server= require('http'); var path= require("path"); var bodyParser = require('body-parser'); var mongoose = ...
2
votes
3answers
523 views

ANGULAR-UI-ROUTER: Resolve state from URL

I'm making an app with dynamical states, and sometimes I need to resolve the state name from the url. e.g.: I have /dashboard/user/12268 and I need to get the state 'dashboard.user'. Is there any ...
21
votes
4answers
17k views

Dynamically set the value of ui-sref Angularjs

I have searched for a similar question but the ones that came up seem slightly different. I am trying to change the ui-sref='' of a link dynamically (this link points to the next section of a wizard ...
4
votes
1answer
52 views
+100

Can I stop the transition to the next state in an onExit?

I have two states, A and B. When I exit state A by clicking on a close button I do a transition to screen A using $state.go to state B (screen B) When I exit state A by clicking on the back ...
1
vote
1answer
26 views

AngularJS State management ->load multiple states in one page

i am developing a site in AngularJs with ui-router. I have a situation where on button click i need to change and load three state into that page and the three looks like the image .Please help me how ...
0
votes
1answer
29 views

IONIC Framework - template getting reloaded multiple times

(Demo of issue added at CodePen, url given below) In app.js I have my routings defined as.. $stateProvider .state('login', { url: '/login1', templateUrl: 'templates/login.html', ...
4
votes
1answer
81 views

ES6 import syntax with Angular 1.5 UI Router

I'm trying to combine Angular 1.5, UI Router using ES6 import modules syntax with Babel & Webpack. In my app.js I have: 'use strict'; import angular from 'angular'; import uiRouter from ...
0
votes
1answer
30 views

Angular ui-router named views abstract controller not fireing

It seems that having a controller in an abstract named view will not fire that controller when a child view also implements a controller, only the child controller fires. My setup is as follows: ...
0
votes
1answer
18 views

Angular scope items not applies after item change

I have items service,items list controller, and item details controller: .state('dashboard.items', { url: '/items', templateUrl: '/js/components/dashboard/items/items.html', ...
0
votes
0answers
48 views

MySql query formatting error

I'm using Php/MySQL and having difficulty to run a MySQL query: <?php $connection=require_once("../connection.php");?> <?php $query1='SELECT TABLE_NAME FROM information_schema.TABLES WHERE ...
0
votes
0answers
22 views

ui-router controller instantiated again on ui-sref

I've a state A with a link to a state B. State A's controller contains some method declarations and calls on $scope. So something like: controller : function($scope) { $scope.myFunc = { ... } ...
2
votes
1answer
184 views

nested ui-view not being populated

I'm trying to get ui-router to properly work with nested ui-view elements but I'm having trouble getting the nested view to actually render. Here's my code: app.js 'use strict'; var lunchrApp = ...
0
votes
0answers
40 views

Angularjs UI Router states and $scope

I am using the ui-router.I'm having trouble with the search form submission. I seem to have the navigation working between states(home and then click on search button) and it takes you to the search ...
137
votes
10answers
116k 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: ...
0
votes
1answer
21 views

URL Route Parameters in AngularJS ui-router

I want to be able to reload just the nested view of my application and attached a route parameter on so that I can have URL routing in my application. I cannot figure out how to do this, I initially ...
0
votes
1answer
18 views

ui-router $urlRouterProvider wait until all states loaded

I'm trying to dynamically load a bunch of states, by merging them from some disperse files. I'm collecting all of them with $http.get and then add all with $stateProvider.state(name, config). All ok ...
2
votes
1answer
34 views

AngularJS - Does scrolling to an element belong in a directive?

I'm well aware that DOM manipulation belongs in directives rather than controllers, but I'm hung up on whether simply scrolling to an element (with jQuery's scrollTop) would be considered DOM ...
0
votes
0answers
17 views

Dynamically viewing different states in angular ui router

I am trying to add states to dynamically view my pages using angular-ui-router. But I couldn't understand, what I have done wrong. Please someone correct me. I took help from this plunker by Radim ...
0
votes
0answers
14 views

adding history to browser from angularjs

I am using angularjs and ui-router. I have a page where i search certain content and show/hide some sections. I want to add history to browser, so that when user clicks on back. He can go to previous ...