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

Calling parent controller from onEnter

I'm trying to familiarize myself with Angular and ui-router in particular. Is it possible to call some function in the parent controller, from the onEnter function inside a $stateProvider? I hope ...
0
votes
1answer
26 views

How to use AngularJS UI-router capture this URL with an optional parameter?

I'm using AngularJD ui-router to capture my URL and send two parameters from that URL to my controller. Here are my requirements: The first parameter is a mandatory integer (id) The second parameter ...
0
votes
0answers
40 views

angular-ui-router always redirects to $urlRouterProvider.otherwise

In my Angular SPA application, when type the address into the address bar or click on ui-sref link, I am always redirected to the $urlRouterProvider.otherwise. My Code is given below: ...
0
votes
1answer
27 views

AngularJS ui-view not receiving scope

I want to simply show a sidebar with ng-if when isCreating === true. The ng-click event is from a nmNav directive which is bound to the same controller as the state – NotesController. But it seems ...
0
votes
1answer
23 views

What is the right way to setup urls.py for django-rest-framework + angular-route + static files?

I understand the concept of what I want to do (there is a rather nice question here: Django, REST and Angular Routes) Django has a route for DRF, Admin, and needs at least one more, for the angular ...
0
votes
1answer
15 views

AngularJS UI router: Block view

Right now i am making an AngularJS+UI router install application. But i have a problem, the problem is, that i want to disable access to the views, associated with the install application. I want to ...
0
votes
0answers
20 views

url naming issue in angularjs

I am trying to pass a parameter through states by $stateProvider and having a display issue. The parameter I try to pass is something like "foo/bar/zoo", which means it contains / character. In the ...
0
votes
1answer
14 views

UI-router abstract state with no url

A way to define an abstract state using the UI-Router is as follows: .config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/blog/home'); $stateProvider // ...
0
votes
1answer
22 views

Set AngularJS app configuration from a service

My app starts with login page as the first view, where user is supposed to enter username and password. Based on the username, properties of the user if fetched from database using databaseServive. I ...
0
votes
1answer
18 views

Angular UI-Router Multiple Menu (Top Horizontal and Left Vertical Menu)

I have top level menu, and then I have left menus, which will be refreshed based on the selected top level menu. I am able to create that link, but as soon as I select the left menu, it goes blank as ...
1
vote
1answer
34 views

Setting AngularJS app configurations after a service has been called

I am using $urlRouterProvider service in my app.config to define the default routes in my AngularJS application. I define it as follows: app.config(function ($stateProvider, $urlRouterProvider) { ...
0
votes
2answers
14 views

One ui-sref link working, the rest don't

I've got a page where I three links on an Angular template. The first link works, the second two don't. The first link shows the cursor as a pointer, the second two show the cursor as auto/default. ...
0
votes
1answer
18 views

Changing Angular UI router app root from “#” to something else

When I implement angular UI router in my app, my view URL appears as : www.example.com/serverpath#/UIRouterPath1 www.example.com/serverpath#/UIRouterPath2 Now I want to change to something like ...
0
votes
1answer
17 views

How do I redirect mydomain.com to mydomain.com/#/ using nginx?

I am using Angular Ui-Router in my web app. Right now I have to use mydomain.com/#/ to access this. How do I redirect users from mydomain.com to mydomain.com/#/ in nginx ?
0
votes
0answers
26 views

42 mins to 2016 to cover 1 line of code

I can't menage to code coverage this $state changing service: ($state) -> @$inject = ["$state"] -> $state.go "home.about" This is my test wich fails last 2 expects mock = require "mock" ...
1
vote
1answer
19 views

Angular ui-router hide based on roles

I'm using Angularjs with ui-router to navigate within my web app. I'm using Web Api as my backend. I used a tutorial from Taiseer Joudeh to implement authentication and authorization. now that part ...
6
votes
2answers
62 views

why splice not work properly in angular js

I am trying to make one demo in which i have one checkbox list .I am able to display the list using ng-repeat . What I need if user click on one check box(only one checkbox is checked) .it display ...
0
votes
1answer
27 views

AngularJS/UI-Router: How do I use one controller with multiple named views?

I have a child state that fills up named views in the parent state (header, content). They both share the same data, however, and I don't want make a redundant second controller but seems like that's ...
0
votes
1answer
15 views

Assigning separate controller files in Angular's UI Router

I am new to Angular and Angular's UI Router. I have a basic index.html file in which I inject the views. And then I have app.js with the routes inside, a template client.html and a controller about ...
0
votes
1answer
6 views

Pushing data from Angular Bootstrap Typeahead into another tab using UI-Router

I have 3 tabs: customers, billing, and method. On the first tab I have the Bootstrap Typeahead, that is connected to a json file of customers. The second tab is a detailed view of the customer account ...
1
vote
1answer
15 views

Multiple Views in one Tab

Here is a simple example of what I'm trying to do. I have 2 tabs (Home and News) and 3 views (Home, News and Details). When I click on the Home and News tabs, it displays respectively the Home and ...
1
vote
0answers
24 views

Angular UI-Router

I am new to Angular.js and was trying to create a link that displays a form when clicked on, but it doesn't seem to work. this my index.html <!DOCTYPE> <html ng-app="MyApp"> ...
0
votes
0answers
18 views

AngularJS, UIRouter – Transclude HTML into ui-view

I wanted to pass some HTML into an ui-view, much like you would do with a normal directive. However, I can't seem to understand if ui-view supports it or not. I'm doing this, currently: <div ...
1
vote
2answers
24 views

confirm email address using Angularjs

The backend has created user and needs the email to be confirmed and it has sent out an to the address (see below) Please confirm your account by clicking after clicking on the link the user goes ...
0
votes
0answers
12 views

Mean JS : Multiple view - Can not access route

I am trying to create a MEAN app where i have two users one administrator and other one is customer. I am facing some trouble in accessing the routes inside the admin/index.ejs. First of all i will ...
1
vote
1answer
23 views

TypeScript Build Error : Property does not exist on type 'IStateParamsService'

I am using TypeScript almost entire of my client project. Currently I am facing a technical problem. In my HTML, I have an anchor tag like below : <a class="btn btn-default mrm" ...
0
votes
1answer
18 views

How to enable event default in anchor click in Angular ui-router

Basically I'm asking this gentleman's question: How to disable static url in angular ui-router? My DOM structure looks like this: <div ui-view> <a ...
6
votes
5answers
437 views

$location.path change hash to %23 & .hash is not working fine

I want to redirect to the another page & focus should be on the some DIV with id let's say 'some-div-id'. I tried following $location.path('/' + $scope.config_path.school + '/' + ...
0
votes
0answers
195 views

Ionic + Angular UI-Routing: How to delete Back Stack?

Im working with the Ionic-Framework and AngularJS. If you create the Ionic sidemenu sample project: ionic start myApp sidemenu You will get a small example application which shows my exact problem. ...
0
votes
1answer
312 views

Redirect to original state after login using UI-router

Using UI-router, when a user goes to a page that require's a login, after they login, I would like to redirect them back to the original url they came from. So for example, /account/profile --> ...
5
votes
1answer
3k views

Angular Material Design Animation

I'm currently developing a mobile web application with AngularJS, ngAnimate, Angular-Material and UI-Router. I'm following Google Material Design specifications for the UI/UX part. I'd like to ...
6
votes
1answer
2k views

How to attach navbar only on certain pages using ui-router?

How to display a navbar on every page except landingpage, so that not have to attach a navbar file on each of needed pages? Now I have enclosed navbar on main app layout, how it should be handled to ...
15
votes
3answers
13k views

ui router - nested views with shared controller

I have an abstract parent view that is meant to share a controller with its nested views. .state('edit', { abstract: true, url: '/home/edit/:id', templateUrl: ...
1
vote
2answers
525 views

Change state of angular app from resolve method of state provider

I'm using ui-router in my angular application. Currently I've two routes /signin & /user. Initially it shows /signin when the user clicks on the login button, I'm sending a ajax request and ...
14
votes
4answers
9k views

Separate controller per tab in angular-material w/ ui-router

Currently, I'm working with angular-material, attempting to implement my md-tabs so each md-tab is a separate state. My current markup looks like this: ...
13
votes
1answer
16k views

AngularJS: $viewContentLoaded fired before partial view appears

For a partial view I want to do some JavaScript stuff that I usually would do with $(document).ready(function() {...}), e.g. bind venet listeners to elements. I know that this doesn't work for ...
7
votes
2answers
435 views

What is the benefit of using multiple modules in angular?

I'm a familiar person with Angular Js, recently I've seen that in some projects multiple angular modules are created and assembled in main module. The code looks like. ...
116
votes
3answers
92k views

How to pass parameters using ui-sref in ui-router to controller

I need to pass and recieve two parameters to the state I want to transit to using ui-sref of ui-router. Something like using the link below for transitioning the state to home with foo and bar ...
8
votes
3answers
2k views

Angular-ui-router and href='#'

I'm using angular-ui-router and have an issue with empty a tags, like href='#'. I'm using bootstrap, which makes extensive use of href='#' for dropdowns and such. The problem is if a user selects a ...
14
votes
4answers
29k views

Using $window or $location to Redirect in AngularJS (resolved)

The app I am working on contains various states (using ui-router), where some states require you to be logged in, others are publicly available. I have created a method that validly checks whether a ...
10
votes
2answers
3k views

How not to change url when show 404 error page with ui-router

I want to show 404 error page, but also I want to save wrong url in location. If I'll do something like that: $urlRouterProvider.otherwise('404'); $stateProvider .state('404', { url: ...
46
votes
5answers
58k views

Injecting $scope into an angular service function()

I have a Service: angular.module('cfd') .service('StudentService', [ '$http', function ($http) { // get some data via the $http var path = 'data/people/students.json'; var students ...
158
votes
8answers
70k views

angular ui-router login authentication

I am new to AngularJS, and I'm little confused of how can I use anguler-ui-router in the following scenario. I'm building a web application consists of two sections, first is the homepage with it's ...
10
votes
5answers
3k views

Prevent calling parent when nested ui-sref

Let say I have nested DOMs and each has ui-sref for different angular-ui-router state. I want to click outer to only alert outer and click inner to only alert inner. Currently if I click inner, it ...
122
votes
10answers
105k 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: ...
3
votes
1answer
571 views

resolve firebase data using ui-route

I'm new in angular/ui-route and firebase. Do you know if it's possible to resolve firebase data using ui-route ? I tryed the following states : .state('contacts', { abstract: true, ...
446
votes
10answers
100k 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 ...
37
votes
3answers
30k views

Set URL query parameters without state change using Angular ui-router

How should I update the address bar URL with a changing query parameter using AngularJS' ui-router to maintain state when refreshing the page? Currently, I am using $state.transitionTo('search', {q: ...
45
votes
5answers
33k views

AngularJS: Pass an object into a state using ui-router

I'd like to be able to transition to a state and a pass an arbitrary object using ui-router. I'm aware that usually $stateParams is used, but I believe this value is inserted into the URL, and I ...
31
votes
5answers
9k views

UI Router conditional ui views?

I can't figure out a reasonable way, which doesn't feel like a hack, to solve this rather trivial problem. I want a guest to see a splash page when they access the index of the website and a logged ...