0
votes
1answer
16 views

injecting ui-router resolve to directive

i am using ui-router and there i am resolving some data i want to inject the resolve to my custom directive ,below is code how i am doing module portal { $stateProvider.state('portal', { ...
0
votes
1answer
22 views

How to inject state parameter automatically

Abstract Hi, I'm using angular + ui-router in my project, I have huge amount of nested states and different views that in turn contain huge amount of different inputs, a user fills these inputs ...
0
votes
1answer
16 views

angularjs controller not executing sequentially when using asynchronous service

I'm having trouble figuring out a way to use local variables in a controller that contains an asynchronous call. Is there a way to force the controller to run [at least some of] the code sequentially? ...
0
votes
1answer
8 views

How can I use $stateprovider to dynamically create states for each node of a tree?

In my application users are traversing a tree that can get a little deep. Each level of the tree is populated via a rest call. The page however remains oblivious to the traversal happening inside it, ...
2
votes
1answer
28 views

UI Router changing URL but not page

I'm not able to get UI Router to work properly on my page. It works fine for the navigation links, but not for the specific section I'm working on. I was able to recreate the issue in a plnkr ...
0
votes
0answers
14 views

How to access application from Mobile

I'm using Yeoman + AngularJS + Ui Router. When I`m used ng-router its possible open mobile browser (local-ip):9000 and use app, but with Ui Router I can not do the same. Should I setup something? For ...
0
votes
0answers
21 views

Angular html5Mode not reacting as expected when entering manually a url

I have been trying to make my site work correctly with html5Mode. My server is written with c# mvc.net. I have angular-ui-router. I have succeeded making the site work without the preceding #, and ...
0
votes
0answers
18 views

Angular route and filters to share state of the app

A question about filters and routes - if the application is in a state after the user has picked a load of filters, is it possible to share the url so another user receives the same state. for ...
1
vote
1answer
12 views

AngularJS multiple routes using JSON data ids

We are new to AngularJS and finding one-or-two problems with setting up multiple routes when using ID's from Json Data. We are trying to replicate AngularJS Tutorial, so we can click each 'View' ...
0
votes
0answers
6 views

UI Router: get access to currently pending transition

Docs for the $state says, that we can access currently pending transition via $state.transition property. I explored this property after $stateChangeStart event (& before $stateChangeSuccess ...
1
vote
1answer
37 views

Navigate between states with <a> </a> tag on click

How to navigate between states defined by $stateProvider on click of <a> </a> tag Here's is my state.. $stateProvider //region page States .state('page1', { url: ...
0
votes
1answer
35 views

ui.router 'otherwise' doesn't seems to work

I'm trying to get ui.router to work with the following setup. export class Router { /* tslint:disable no-unused-variable */ private static $inject: string[] = ["$stateProvider", ...
1
vote
1answer
29 views

How can I have multiple instances of one controller for multiple templates

Trying to use a reusable controller for a generic template html <div class="row col-lg-10 pull-right"> <div ng-init="catId = 1" ui-view="firstQuadrant"></div> <div ...
1
vote
1answer
10 views

ui-sref error when use special character in params

Here is my code <a ui-sref="exeprofile({pname:@event})"></a> there is a '@' in the paramater ,so I get error tips like this 'Error: [$parse:lexerr] Lexer Error: Unexpected next ...
0
votes
0answers
20 views

Capturing Error Data on $stateChangeError AND $stateNotFound

Im trying to setup some angular error logging around ui-router I'm not getting the events for $rootScope.$on('$stateChangeError'...) - or $stateNotFound. app.run(....) ...
2
votes
1answer
33 views

Create states from json file / http

I have a backend which is generating a json file containing information about the most important pages. I would like to load this json file, and build corresponding states based on the data in the ...
1
vote
0answers
22 views

How to allow static url routes to exist on a dynamic url namespace

So I have 2 routes in angular-ui-router, one static and one dynamic $stateProvider .state('home', { url: '/home', templateUrl: 'home.html' }) .state('profile', { ...
0
votes
0answers
22 views

$materialDialog fails to show when used with angular-ui-router

I have a sample plunker here I have a login page and on a successful login, the user is redirected to the actual home page, which is similar to: $state.go('home'); Now, after logging in, I have a ...
0
votes
1answer
16 views

Routing: Visible parameter value on hovering over ui-sref disappears when clicked

I am using angular-ui-router module of AngularJS and have the following ui-sref which when I hover over shows http://localhost:3000/u/bob#/123/pin/4567, but when I click on it, I get only ...
0
votes
0answers
18 views

Unit testing $urlRouterProvider.otherwise in provider config

So i've got my code: (function (ng) { ng.module('myModuleName') .provider('myProviderName', ['importedThing', function (importedThing) { //lots of cool stuff happens in here ...
0
votes
2answers
57 views

AngularJS + UI-Router - Manually Type URLs in HTML5 Mode without HashBang

I am currently using AngularJS with UI-Router for state management and express on the back-end. I currently have hash bang mode enabled and have been trying to find a solution that allows you type ...
0
votes
0answers
21 views

UI-Router reload only Current State and its siblings not parent State

this is the structure of my app : State Parent Type URL site root state abstract '' site.home ...
0
votes
1answer
23 views

Angular ui-routing and multiple views in nested child states

I have a parent state that is abstract which basically only contains a template html that has ui-views. I have multiple child states that contains multiple views, and each of the child states has ...
0
votes
1answer
21 views

UI-Router ui-sref-active throws error when using ui-sref params

I've got a Bootstrap navbar dropdown menu, where clicking the parent link produces the dropdown list (default behaviour). The dropdown list of the parent is built using ngRepeat from an array of ...
0
votes
0answers
41 views

ui-router Abstract state is resolving after the child state is called

I am making a normal authentication login-signup system using JWT. Here what i'm doing: I am saving the JWT token in localStorage. app has a abstract state called site which is child of root state ...
0
votes
1answer
19 views

ui-router preventDefault() but persist URL, or change URL of declared state

Two similar/related questions: 1) While in a $stateChangeStart event, is it possible to allow the url to change, but prevent the actual state transition? If I use event.preventDefault(), it prevents ...
0
votes
2answers
29 views

How to get state variable value from the URL

My state look like this. $stateProvider.state("user.admin", { url: "/administration/:action", views:{ content:{ templateUrl: 'views/admin.html', ...
0
votes
1answer
15 views

ui-route parameter $location.path

Anyone tried to change view via $location.path with ui-route, but with a parameter? I'm trying to do that but it doesn't work. I think it's from my app.js routes definition that doesn't work What I ...
0
votes
2answers
34 views

Updating resolved objects in ui.router parent states

My question is two fold: 1 - I have a parent state and several child states using ui.router, there's one object (stored in mongodb) that is need in all states, but it gets updated by all states. In ...
1
vote
2answers
41 views

How to determine default URL on .otherwise() without having resolve available

I'm trying to set the .otherwise() using a rule function to determine the default URL. I can't inject state or read the path since the application hasn't loaded yet, what I really need to be able to ...
0
votes
2answers
34 views

Angular Controller involving 'ui.state' throws error: Argument 'Controller' is not a function, got string

I have just started experimenting with the angular-ui-router from github to use states instead of the mess that is routing. I have written a controller and included it in all my bundled files, html, ...
1
vote
1answer
41 views

Ui-sref not generating hash in URL (Angular 1.3.0-rc.3)

Since upgrading from Angular 1.3.0 RC-2 to RC-3 the hash-sign in my links generated by ui-sref has disappeared. The link is clickable and the state transfers happens correctly, but if i copy the link ...
0
votes
1answer
32 views

Binding to data when changing the URL

I am building an application that uses ui-router. On my /teams route I have a form where a user can add a team name which then pushes the name to my MongoDB and binds to the view and displays the team ...
3
votes
1answer
41 views

Is it possible to have multiple states on a page at once or change the state of a named view?

I am developing a page that has a news feed on it; when I think of it logically, this feed has several states on it (news, settings, favorites, etc.). A feed should be able to be on many types of ...
0
votes
1answer
23 views

AngularJS module creation inside RequireJS define with dependency

I'm having an issue creating an AngularJS module inside a RequireJS define method. When I make reference to the ui-router module that I need, Angular tells me: Uncaught Error: [$injector:modulerr] ...
1
vote
1answer
20 views

How do I correct this use of ui-router multiple named views

I'm trying to setup a page that has no parent template but contains multiple named views using angular ui-router. A plunkr is here There is a simple html setup: <body> <div ...
0
votes
0answers
10 views

Angular ui-router: Where to put $promise method or howto load asynchronously?

This is my state provider of my ui-router: ... resolve: { myModelData: ['$http', function($http) { return $http.get('api:port/path').then(function(response) { ...
1
vote
1answer
34 views

Modal dialog using ui-router from any parent, how to correctly specify state?

I am trying to open a modal dialog using Angular's ui-router as explained here. The goal is for the dialog to be accessible anywhere, a url is not necessarily needed but it would be nice if I could ...
0
votes
1answer
27 views

Using formular in ui-view angular

I'm using a SinglePage-Application with one controller and three ui-view templates inside. Here the HTML: <div class="ng-scope" ng-controller="gameController"> <div ...
0
votes
0answers
30 views

UI-Router How to automatically load a nested view within the parent view as a default

I've been playing with UI-Router since ngRoute doesn't quite cover what I needed based on my different layouts requiring multiple nested views. What I can't figure out in UI-Router is how to load ...
0
votes
1answer
27 views

Ui Router Resolve - Cancel State Controller Load Afterwards?

Angular UI Router Question When $state.go("main.loadbalancer.readonly"); is activated in the resolve block, the main.loadbalancer.vips state controller VipListCtrl (the controller only) still loads ...
0
votes
1answer
20 views

UI-Router's resolve functions are only called once- even with reload option

In Angular ui router, when $state.go("main.loadbalancer.readonly"); is ran after main.loadbalancer.readonly has been previously activated, my resolve: {} is not being evaulauted/executed. The resolve ...
2
votes
2answers
112 views

AngularJS ui-router to a state but use different URL

In my AngularJS application I want to catch errors and send the user to a 404 state like so: $rootScope.$on('$stateNotFound', function(event, unfoundState, fromState, fromParams){ ...
0
votes
1answer
35 views

AngularJS ui-router otherwise to state instead of url

I'm using AngularJS and ui-router and in my app.js I have the following line: $urlRouterProvider.otherwise('/'); However I don't want it to send the user to a URL but instead a state: ...
2
votes
1answer
29 views

How to correctly use nested routes to fix the following example?

So, it seems I am not getting ui-router, after all. Here is the broken example: http://plnkr.co/edit/WgDqTzE3TJjrCZ2pxg5T?p=preview The actual file structure is: app/ app.js index.html main/ ...
0
votes
0answers
11 views

AngularJS Ui Router match multiple routes

Is it possible to match multiple state within ui-router ? I have a number of routes which share the same template and controllers .state('someState', { url: "/home", views: { ...
0
votes
1answer
33 views

Redirect state in angularjs

This is the state configuration: angular .module('grabhutApp', [...]) .config(function ($stateProvider, $urlRouterProvider) { $stateProvider // ACCOUNT ...
1
vote
1answer
31 views

Angular UI-Router $urlRouterProvider.when handler result ignored by $state

I added a when() method to set/validate a route prefix, which looks something like this: $urlRouterProvider.when(/[a-z]{2}-[a-z]{2}/, [ '$match','myValidatorSrv', function($match, myValidatorSrv) ...
1
vote
2answers
23 views

Angular UI-Router parsing URL that contains slashes as part of state

I have a nested a state that is associated with a file path within a directory. That is, the url for the view is something like /workspace/path/to/my/file.txt. Right now, simply using /:path does not ...
1
vote
1answer
21 views

angular ui-router all controllers get reloaded with state change

I'm having an issue with angular ui-router where all controllers on a given state are being refreshed when going to the same state (but with different params). For reference my states are like: Main ...