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)

1
vote
1answer
15 views

UI Router 1.0 state change events not working

I'm migrating my Angular 1.5 application to Angular UI Router 1.0-beta3 to use the component router. I'm listening for state change events on $rootScope but none of the events are fired. Example: ...
0
votes
0answers
8 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
2answers
15 views

Is it possible to load a routerOutlet from a function in angular2

I want to load a routerOutles in angular2 without a button, but can't figure out how to do it. This is how to do it with a button: <button (click) = "load()" ><a routerLink="/next" ...
0
votes
2answers
19 views

Protecting views, authentication or canActivate for Angular 2 with ui-router

I thought I could try using ui-router with Angular 2. Currently, I already have some default angular2-router configuration, which mostly comes down to something like: export const homeRoute: Route = ...
0
votes
0answers
26 views

How to redirect from NgOnInit?

I want to redirect, under certain conditions, when the page is loaded or before. For example, Cookies have to have something, then do a redirect. this.router.navigate(["details"]); in AppComponent....
0
votes
0answers
12 views

sx-sref not being compiled to href

I have the following directive that I'm using to generate links (among other things). I've simplified it somewhat here: oActivityModule.directive('activityDetails', function () { ...
0
votes
2answers
20 views

ui-router to resolve same object but with different data

I have the following example which resolves an existing product code by returning the results from my DB (ProductsFactory.getProduct) and then enters my editProduct state: .state('editProduct', { ...
0
votes
1answer
19 views

How can I maintain previous state param on 404?

I am new to working with Angular and I need some help with router-ui package. Several of my states are made up of a dynamic value like so: .state('state-name', { url: `${dynamicValue}/state-name`, ...
0
votes
1answer
14 views

Set default nested state in ui-router

I have two level nested state on ui-router and I can't set a default nested state for some view. I need to load the state cars.detail.supply.list when the state cars.detail is active without changing ...
0
votes
1answer
27 views

nested ui-router $location binding

I have some problem with binding when i use ui-router. I am trying to make the app modular and keep it clean and simple. I have the following app.js // main routing - index.html var app = angular....
1
vote
1answer
78 views

Angular 2 wrapper project

I have to develop an angular 2 application which is the wrapper of other angular 2 applications. Lets say the main Module of project is called MainModule Other 3rd party modules which are deployed in ...
0
votes
0answers
8 views

ui-router and angular-translate working together

I read different SO posts and blog posts about that question but none of them answered my questions. Here's what I have: Angular-translate is activated to find the preferred language, store it in ...
0
votes
1answer
27 views

Change nested views through ng-click in ui.router

I am trying to insert views inside view. But it is working only at the defined state but when I trying to change the view with the help of ngClick the state lost the path. It is like View 1 --...
0
votes
1answer
23 views

AngularJS When and Otherwise with UI Rout

I'm new angular student. I have a problem with my routes of UI Route. here is my code: $urlRouterProvider .when('/GRN', '/GRN/Produtos') .when('/Executivo', "Executivo/Produtos") ....
1
vote
1answer
29 views

UI-router: deal with nested controllers

I have following config: .state("addUser", { url: "/addUser", templateUrl: "users/add-user.html", controller: "AddUserParent", controllerAs: "$ctrl", abstract: ...
0
votes
2answers
22 views

UI-router nested view not being injected

I have a root index.html file which has a ui-view tag, to which a main template file home.html is injected. home.html has a ui-view tag which needs to change depending on the current route. I ...
0
votes
1answer
23 views

what does the '.' in state name in Angularjs state provider mean?

what is the significance of '.' in state('xxx.yyy') in Angularjs 1.x? Q1) Are the 2 states emAllTickets.closed and emAllTickets/closed are different? what is the significance of . and / here? Q2) ...
0
votes
2answers
27 views

Angular ui.router provide state

I have an angular/rails app with 2 pages that needs to serve 2 templates: The states are currently displayed with <ui-view></ui-view> on 2 different pages: http://localhost:3000/...
0
votes
1answer
25 views

Identify path of value from console results

I have an angular project that calls an API. I'm trying to figure out how to reference a value from the returned results and am trying to figure it out by looking at the console.log results. Here is ...
1
vote
2answers
22 views

Showing undefined when passing data using params in ui-router

In my controller, $scope.register = function(index) { $state.go('account.accountRegister', {obj: {accountType: $stateParams.accountType, accountName: $scope.data[index].accountName}}) ...
0
votes
1answer
16 views

Hoow to use params without showing in url?

controllerA from state A $state.go('account.accountRegister', {accountType: $stateParams.accountType, acName: acName}) State defined in app.js .state('account.accountRegister', { url: '/:...
0
votes
0answers
14 views

Cannot display images and use php scripts within AngularJS UIRouter based WordPress site

I am importing AngularJS based SPA using ui-router into WordPress but have hard time getting the images to display and insert php code into the partial pages. Everything is fine at header and footer ...
0
votes
2answers
49 views

Passing parameters to Angular UI router template

My angular ui router is changing states/views as: $stateProvider .state({ name: 'home', url: '/', template: '<home-view></home-view>', ...
2
votes
2answers
31 views

ng-show with $state.includes has blink/flickering - angular; ui-router

As described here How to ng-hide and ng-show views using angular ui router, I have the following markup: <div class='container'> <div ng-show='$state.includes('state1')></div> &...
0
votes
0answers
34 views

ocLazyLoad and Angular UI Router

I'm using oclazyload to load an Angular controller dynamically, when I enter a specific nested state. That nested state: .state('login.home', { url: "home", views: { "nav-right": { ...
0
votes
1answer
25 views

Angular UI Router Controller Provider $HTTP

I was hoping after a user logs in I could load a controller for the logged in view in Angular UI Router as simply as this: "content@":{ templateProvider: function($http, $stateParams) { ...
0
votes
1answer
21 views

scope access when promise resolved in Angular UI-Router

I have a small question regarding scopes and promises. I declared wiz_ids outside a promise call and I would like to access it again when the promise is resolved. I tried to use bind() but without ...
-1
votes
0answers
18 views

Parse URL to state in ui-router 1.x for angular 1.x

I need to parse $location.path or $window.pathname to state. Has anyone done this?
0
votes
0answers
12 views

ui -router update the current state for abstract parent state

I am using ui-router for maintaining the state in my application. The application has one abstract parent state and few child states. Parent state has got some resolves(working fine), now since I have ...
0
votes
0answers
15 views

How to prevent change state when Ionic “onHold” gesture is fired

I have a list of items with href that goes to an specific page of every item, and also has a onHold gesture that displays an action sheet with some options (delete and ...). I wrote this angular ...
-1
votes
1answer
52 views

Uncaught Error: [$injector:modulerr]

I am getting an Uncaught Error: [$injector:modulerr] jquery.js:3855 It seems i have included almost all the dependencies but still i am getting an error app.js angular.module('app', ['ui....
0
votes
0answers
35 views

How to load a view in angular directly through a URL

I want to access a view in my Angular app. It does work when I go there through a button however when I want to access that view via a link (e.g. by clicking on one) or when I am refreshing the page, ...
0
votes
1answer
29 views

UI-Router (resolve) cant pass data into controller

when i run code like this my controller stops working and it happens with all kinds of data passed with resolve, from api or any other way.. i just cant pass anything to my controller > $...
0
votes
0answers
14 views

ng-infinite-scroll with ng-show and sticky states

I am new to angular. In my single page web app, I have two tabs with ng-infinite-scroll in each of them. The two tabs are traversed between using a nav-bar, <div ng-show="$state.includes('...
0
votes
2answers
24 views

AngularJS: Editing a “pick-one” field in a separate view

I am developing an AngularJS 1 (+ Ionic + ui-router) single page app. Among other things, the app lets 'CRUD' employees and companies. I am struggling with the "edit employee" page. This page shows ...
3
votes
1answer
34 views

Remove # from URL in angular JS

Hi I am using Angular JS for my Front End, php is the Service layer. I am trying to remove the # from my url. Now : http://localhost/loginwithangular/#/login I want look like : http://localhost/...
0
votes
2answers
56 views

Angular 2 - Webpack 2 - template-loader not working with templateUrl

I've created a minimal webpack example for my Application and I try to use templateUrl with "./file.name.html" to get compiled. But the only thing my Application shows is the name of the templateUrl "....
0
votes
1answer
32 views

Cannot Resolve State with ui router

I'm trying to use ui router to set states after I pulled pages from a database, but It came up with this error every time I'm trying to click on a sref-link. Here are the app/app.js and the app/index....
1
vote
1answer
33 views

Restore scroll position on back

I have a long page of results. When I click on an item (going on a specific item page) and then go back to the page result it could be very useful to restore the scroll position in result page. I have ...
0
votes
1answer
26 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
23 views

Dynamically set router-outlet name

Is it possible to dynamically set the name of a router-outlet in angular 2? I need to create a generic component that contains a router-outlet. Template example : <nav class="nav menu"> &...
0
votes
1answer
15 views

controller reloads even though reloadOnSearch is set false

i build a webpage where I have several views but only one controller. As the controller should not reload on page switch I changed all the routes to "/main/{{itemNo}}/?routname". However when ...
0
votes
1answer
33 views

How to add uib-dropdown to a uib-tab to create a simple dropdown menu on a tab made with angular bootstrap?

i'm a novice when it comes to angular js (v1.5) and i'm currently working on a project using angularjs(v1.5), bootstrap 3, UI Bootstrap. i tried to add the dropdown directive to the tabs directive as ...
-1
votes
1answer
28 views

facebook authentication working with angular ui router [closed]

How to authenticate angular single page web application with angular facebook sdk that would work with angular ui router where the $stateProvider would check and remember user facebook status, would ...
0
votes
2answers
29 views

angular ui-router $stateProvider states iterate through object properties

I have been trying to dynamically populate the navbar from my states configured in $stateProvider. when i try to get the state name or the url or any other properties I get undefined, I have been ...
1
vote
0answers
15 views

scroll to $index on enterState

I use a bootstrap-ui accordion <uib-accordion close-others="true"> <uib-accordion-group ng-repeat="e in list" is-open="status[$index]" ng-init="status[$index]=false" index="$...
0
votes
1answer
16 views

Unable to Unit Test an Angular Controller with service mocked

I'm starting with angularJs and I'm facing an issue when trying to unit test a controller that have a dependency to a service. The application worked as expected but not the unit test. I obtain the ...
0
votes
2answers
17 views

How to keep $stateparams parameters after i refresh the browser

I have this list of users .. When a user clicks in one of those user in the list.. it will redirect me to my profileState with the associated UID of the user. I use state parameters to pass the UID ...
0
votes
0answers
18 views

/traceur 404 error while loading angular2 application

While trying to run Angular2 application using ui-router-ng2 I'm getting Error: XHR error (404 Not Found) loading http://localhost:3000/traceur. Here is the Project Structure & systemjs.config....
0
votes
1answer
20 views

angularjs routes with the same definition loops

I am using $stateProvider to define my routes, and I'm facing issues where if I have two routes with the same number of path parameters they go in a loop with each other and though I'm using ui-sref ...