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

child state resolve injected in a parent controller

I have this state confg : function routeConfig($stateProvider, $urlRouterProvider) { $stateProvider .state('projects', { url: '/projects', template : '<ui-view ...
0
votes
1answer
14 views

[Angular UI-Router]: Refer to named view of current state

As described by the UI-Router documentation you could use relative and absolute names to refer to a named view. In short: .state('contacts.detail', { views: { // Absolutely targets the '...
0
votes
0answers
12 views

How to resolve Angular Service directly from an Angular Component

I am currently using Angular 1.5. I am using ui-router as my primary navigation mechanism. I am leveraging Angular components a lot. I understand that I can use .resolve on my states to ...
0
votes
1answer
23 views

Angular directive not working if loaded with RequireJS

I have a directive that works correctly when RequireJS is not used, and I'm trying to migrate it to an application based on RequireJS. The directive wraps an Angular UI modal, and uses transclude to ...
0
votes
2answers
34 views

Cannot modify $stateParam parameter in controller

I am redirecting into a state using $state.go('someState', {'param':true})and as you can see I am also modifying a flag as it happens. However when I try to switch the flag back to false via $...
2
votes
1answer
98 views

offset ui-router autoScroll

I am using ui-router's autoScroll to scroll down to a div (ui-view) when page loads/route change. It currently does so. Is there any way to offset autoScroll? I need to leave 100px above the element ...
0
votes
0answers
17 views

AngularJS 1.x Multiple named and nested views needles refreshing

I'm trying to create a multi-viewed page with states, and when changing the url (for example: studentDetails) only a single view changes and the others stay the same. I almost made it, but when ...
-3
votes
0answers
31 views

Pass data (GET or POST) to angular 2 project

The angular project running on localhost:4200/auth /auth has code to receive post parameter. A another simple html file outside Angular project is sending post data to localhost:4200/auth. The ...
0
votes
1answer
12 views

Regex to extract angular path without forwardslashes

I have following routes in my angular app: #/categoryevents #/categoryevents/event/5 #/categoryevents/event/5/3 or for example: #/events #/events/get/5 #/events/get/5/3 I need regex to extract ...
9
votes
3answers
20k views

How to detect if a user clicks browser back button in Angularjs

I have a form-like page with some data. And want to show a popup/alert when a user clicks the browser back button, asking "if they want to go back or stay on the same page". I am using angular-ui-...
0
votes
1answer
18 views

Selecting element generated by Angular using JQuery

Below is a snippet of my code: <body> <div class="body" ng-view></div> <div class="footer" ng-view="footer"></div> </body> The following HTML is being added ...
1
vote
3answers
25 views

How to set default value for state params using a service?

I have a state with a param like, .state('statename',{ url : 'emp/:empId', ... ... } This will show the employee details for the given employee id. I want to show the logged in user's ...
0
votes
2answers
25 views

$urlRouterProvider.when keeps reloading state

I have just added nested states to my AngularJS application, but I also wanted to add a reroute if the parent state was hit, so I added this code to my UI-router angular.module('app') .config(...
0
votes
2answers
1k views

Why don't comment upvotes work? thinkster.io, angularjs tutorial, mean, incrementUpvote()

I'm following the thinkster angular js tutorial here: https://thinkster.io/angulartutorial/mean-stack-tutorial/ and clicking on the upvotes icon next to a comment fails to increment the upvote count....
0
votes
1answer
13 views

RouteProvider not working when loaded from local machine

I developed a web app using bootstrap, angularjs. I used routeprovider to route between pages. The app was working fine when debugged using Visual Studio. The application is running well and I can ...
0
votes
1answer
17 views

AngularJS UI.router multiples views in a single page not working

.state("home",{ url:'/home', templateUrl:'./resources/js/baseapp/ContactHome/views/ContactHome.html' }) .state("home.contacts",{ url:'/home', views:{ "contactByName":{ ...
3
votes
3answers
10k views

UI router Unknown provider for injecting service into child state resolve

Got Unknown provider when injecting service into the child state resolve function. But if defined a resolve in the parent state, it just works. Below there are some sample codes: I defined a service ...
0
votes
0answers
24 views

Angular UI-Router direct navigation returns to root

I want to have the following simple setup: / /about /contact This navigation works perfectly in the app when I use the href or <a ui-sref=". Unfortunately it does not work when I manually type /...
0
votes
0answers
18 views

AngularJS not loading templates in Codeigniter

I'm trying to use Angular with my Codeigniter project. The problem is that it doesn't load the proper template file through angular router. In the root instead of showing templateUrl: 'index.php/...
2
votes
0answers
60 views

Routing in angular 2

I have a Client folder. In the Client folder, i have a modal form file for adding. In the same Client folder, i have a table.html file. Now in the table.html file, i have fa fa-plus button. How can i ...
0
votes
0answers
17 views

UI-Router Unit testing for a state to be redirected, receiving 'error: transition superseded'

I'm attempting to unit test the following AngularJS run function: export default function run($rootScope, auth0Service, $state, lock) { $rootScope.$on('$stateChangeStart', function(event, ...
0
votes
1answer
29 views

Angular 1.5 - Ui-Router 1.0.0-beta.3 - No template configuration specified for 'resolve@root''

So I'm trying to get UI-Router's resolve method to work but I keep getting this error and I have not been successful in resolving this issue. Error: No template configuration specified for 'resolve@...
0
votes
1answer
33 views

Parameters in Angular2 ui-router

I work with angular2 and ui-router (https://ui-router.github.io/docs/latest/modules/ng2.html). I use the stateService in order to move from a state to another in typescript code. How can i get passed ...
0
votes
1answer
16 views

Angular directive with transcluded elements + RequireJS not working

In this punk I'm attempting to have an Angular directive with transclude: true and RequireJS. The transcluded elements should be included in an Angular UI Modal that is opened when a user clicks on a ...
0
votes
0answers
22 views

How to get started with Angular 1.5.x and webpack?

webpack.config.js const path = require('path'); module.exports = { entry: './src/app.js', output: { filename: 'bundle.min.js', path: path.resolve(__dirname, '../dist'), ...
0
votes
0answers
9 views

Angular UI router 1.0.0-beta.3 issue

I am getting a strange issue. I am using 1.0.0-beta.3 version of angualar ui-router. To get the file I use "http://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/1.0.0-beta.3/angular-ui-router.min....
0
votes
0answers
21 views

Why to add PARTIALS in angular JS and spring MVC?

I am working on a demo project for myself and i was testing the PARTIALS option in ANGULARJS. When i add partials in my templateURL the link works even if my pages are not in folder partials(there ...
5
votes
1answer
138 views

How to implement RouteReuseStrategy shouldDetach for specific routes in Angular 2

I have an Angular 2 module in which I have implemented routing and would like the states stored when navigating. The user should be able to: 1. search for documents using a searchformula 2. navigate ...
0
votes
0answers
21 views

Google map api not loading in the localhost, routing using ui-router

So I've been trying to load a google map on my page, and it works fine on my website, but when I run in my localhost I can't see the map and there are no errors in the console. I made sure to check ...
0
votes
2answers
19 views

Ionic: reloading current child state from side menu causes loss of header

I'm creating a simple Ionic menu app and I would like to reload the current state from the side menu.Here's a Plunkr to illustrate the problem. In the 'Search' state, the current time is displayed. ...
2
votes
1answer
48 views

What is the equivalent of $rootScope.$on('$stateChangeStart', ..) in ui-router for Angular 2?

I have experience with ui-router for Angular 1 and now I want to know how to listen $stateChangeStart in ui-router-ng2. Please let me know how the following Angular 1 piece of code can be done in ...
0
votes
1answer
24 views

Angular App using NodeJS: setting two home/index page inside same App for two different domains

I am planning to build a web application using Angular, NodeJS and MongoDB. The main two views and theirs associated services and controllers are: 1. cats.html .... cats-ctrl.js .... cats-...
0
votes
1answer
25 views

Redirection issue with URL parameter with ADAL.js and UI-Router

I configured the state which contains url with url parameters like this: url:route/:id1/:id2:id3 with ADAL js. When I hit url with route/1/2/3, after login, I am redirected to route/:id1/:id2/:id3?id1=...
0
votes
1answer
42 views

angular - Resolved data doesn't refresh in nested states components

I'm using angular 1.5 + ui-router + angular-resource and I try to write component based application. Here si my problem. I have one parent state, which is used for getting and updating data (data are ...
0
votes
2answers
3k views

Angular-UI-Router with Html5Mode refresh page issue

I have an app that uses angular-ui-router with html5mode(true). Everything seems to work fine when running and routing to other states. My default state is app/calendar which is set during module.run(...
0
votes
0answers
31 views

$auth.isAuthenticated is not a function

I'm using laravel-angular material starter and I'm encountering an error when going to /#!/home/ when I enabled data {auth:true} on the routes.config.js. The error is $auth.isAuthenticated is not a ...
0
votes
1answer
33 views

Controllers and Directives in Angular + RequireJS

In this plunk I have a sample code running Angular + Angular UI Router + RequireJS. There are two pages, each with a corresponding controller. If you click on View 1, you should see a page that ...
2
votes
3answers
42 views

AngularJs data binding not working with ionic

I feel like I am missing something obvious with some input text in ionic. I am using angular-ui-router with this route: $stateProvider.state('findPersons', { url : '/findPersons', templateUrl :...
0
votes
0answers
21 views

Angular2: “Rewrite” ActivatedRoute to different Component

I would like to have several components for the same route depending on some internal state. From what I read so far, I should write my own RouterOutlet and modify the "activate" method. Given the ...
1
vote
2answers
59 views

Angular 1 Material FAB inside Angular 1 component not sticking bottom right

On my main page I had this with Angular 1 Material with ui-router: <body layout="column"> <md-button class="md-fab md-raised md-primary md-fab-bottom-right" aria-label="Add Test"> &...
11
votes
3answers
12k views

How might I move AngularJS Routes into separate file

I was curious if anybody was familiar with separating routes from the main app config function. My route list is getting quite large and I wanted to move them into a separate file and load them into ...
3
votes
2answers
877 views

AngularJS and UI-Router: 'Error: transition superseded' during angularjs unit tests

I'm attempting to create an authorization package for a project of mine. I'm getting the error 'transition superseded' during my unit tests, and I can't find out where that would actually be. Unit ...
1
vote
0answers
32 views

Capture redirect route with guard in Angular2

I'm having trouble capturing the original navigating route using a guard in Angular 2. My site consists of a core module protected by an authorization guard, and a login page that's unprotected. The ...
0
votes
2answers
40 views

Why do I have an 'failed to initiate app' error because of jQuery?

I am using angular and I am getting the failed to initiate app error as it seems because of my jQuery script. I have no idea what is causing it. I included script tags for angular, jQuery, ui-router ...
64
votes
1answer
34k views

How to delete '#' sign in angular-ui-router URLs

I'm using the angular-ui-router library and I have a problem with URLs. I have the following code: app.js: app.config(function ($stateProvider, $urlRouterProvider) { $stateProvider .state('...
0
votes
0answers
16 views

Angular 1.6 Routing Error Causing Iteration Recursion Blow up

This question has been asked before here, but for me it still has not worked. My module has the following code: myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $...
86
votes
7answers
109k views

`ui-router` $stateParams vs. $state.params

With ui-router, it's possible to inject either $state or $stateParams into a controller to get access to parameters in the URL. However, accessing parameters through $stateParams only exposes ...
1
vote
1answer
135 views

add angular ionic views and routes after app has initialized

I'm slightly new to Angular JS. I'm using it with Ionic and Phonegap to create a mobile application. This application has views injected into the application by a web server. I would therefore need ...
7
votes
3answers
5k views

UI-Router Multiple Views Single Controller

Is it possible to have multiple views [https://github.com/angular-ui/ui-router/issues/494] with a singleton controller? Use case: I have a ui-view=header and ui-view=content. I change the header ...
0
votes
1answer
25 views

How to clear ui-router hash on page change?

I'm using ui-router 1.0b3 with angular 1.5.x. Also using html5Mode(true). The hash's are not being used for the paths, they are just for the specific page it goes to. I want to be able to go to ...