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
0answers
8 views

UI-Router redirects when url parameters are present

I was building a site with Angular and UI-Router, came across this situation and I can't seem to understand why this is happening. I have an abstract parent called main and two nested states. The ...
1
vote
1answer
18 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
1answer
19 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
20 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
22 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
21 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
12 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
43 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
29 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
31 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
24 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
16 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
47 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
34 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 ...
2
votes
1answer
31 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
38 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
21 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
21 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
31 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
27 views

facebook authentication working with angular ui router [on hold]

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
28 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
14 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
16 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
14 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 ...
0
votes
1answer
8 views

Ui-grid with ui-router passing params

I am a beginner (idiot alert) I am successfully using ui-grid except when they click on an icon in a row it's meant to take them to a new view... The view I'm in showing the ui-grid has a url of #...
0
votes
1answer
25 views

I want to access a logout function from my nav bar on any page

I have an authentication process, where I want to be able to access the logout function on any page from my Index.html nav bar, but for some reason I'm not reaching the scope. I have my app.js ...
0
votes
2answers
35 views

Using typed optional route parameters in ui-router

I am trying to define a single state with an optional integer route parameter. I have defined the following state in my application $stateProvider.state('configuration', { stateUrl: '/...
1
vote
0answers
39 views

Issue with Parent Child Scope With Modal: Using angular ui router with angular bootstrap modal ($uibModal)

Here is my current code: Parent Controller vm.animationsEnabled = true; vm.open = function (size) { var modalInstance = $uibModal.open({ animation: vm....
0
votes
3answers
37 views

How to redirect to home page if I click back button after login in angular JS?

.run(['$rootScope', '$location', 'Auth','$state', function ($rootScope, $location, Auth,$state) { $rootScope.$on('$routeChangeStart', function (event) { if (!Auth.isLoggedIn()) ...
0
votes
1answer
25 views

How to redirect to correct state in ui-router?

When a I enter the url "/samsung" I don know what state should be use so it will just match on the first one in this case category. I have done some reading and I thing I should use the UrlMatcher ...
0
votes
0answers
20 views

Url change event when absolute url is change in angular

I am having url for page1 : Application/Controller1/Action1 I redirect to page1 to : page2 : Application/Controller1/Action1/#/SubAction1/40 Page 1 is in mvc. Page 2 is in angular. If i redirect ...
0
votes
2answers
32 views

How to bind a checkbox list using Angular and get all selected value from the checkbox using ng-reapet method

How to bind a checkbox list using AngularJS and get all selected value from the checkbox using ng-reapet method? I am try to get the value of the selected check box in the angular controller. View &...
0
votes
1answer
17 views

Angular ui.router resolve not working when ng-controller put in html view

I have the following nested states for the ui-router index.html <body ng-app="testApp"> <div ui-view></div> <body> view.homepage.html <div id="header" ng-controller="...
0
votes
1answer
22 views

AngularJS templates not showing on page but are there when page is inspected

I am new to using Angular and Rails and have gotten stuck when I imported my Angular project into a Rails project and split the templates into individual files. Now the nav and footer partials show, ...
0
votes
0answers
5 views

$mdDialog with ui-router

I'm trying to use angular-ui-router ui-views (with nested views) inside an angular material mdDialog, but I cannot find anything on how to achieve that. Is it possible? Or should I use another ...
1
vote
0answers
11 views

Angular Fullstack UI Router not resolving dynamic URL view. Braintree integration

I am using yo angular-fullstack generator with uiRouter. I am integrating Braintree. I am attempting to show the API response as a confirmation page after a transaction is submitted. I can see the url ...
0
votes
0answers
12 views

angular2 ui-router oauth2 implicit

Using angular2 and UI-router, i don't find any way to map url with the hash that come from an implicit oauth redirect, ex: http://somesite.com/#access_token=9a885b89-a9b1-37c9-baa8-a321f83c07d3&...