Tagged Questions
0
votes
0answers
13 views
Angulajs - creating a directive while using ui-router
I am trying to decipher directives... although I viewed and implemented many AngulaJS simple stack tutorials, I am unable to get it to work while using ui-router, not sure why. Too many attempts have ...
0
votes
0answers
13 views
angularjs ui-router - ng-model not allowing input text change unless in ng-repeat
How can I fix the plunker below to allow changes to the "Serial" input text field using ng-model in the example below?
The problem is:
Using ui-router 0.2.0 and angular 1.1.x, ng-model is not ...
0
votes
1answer
18 views
Receive an event on direct page visit from address bar, Angular JS - ui-router
guys I am working on an angular js app which uses ui-router for deep linking and routing. I want to set up a variable on the $rootScope every time a state is visited/changed. I am able to accomplish ...
0
votes
1answer
27 views
angular ui-router maintaining state between tabs
Would like to know the best way to preserve state between tabs. I use bootstrap tabs and angular ui-router. I've a google map in one of the tabs and don't want to reload the map when user selects that ...
0
votes
2answers
31 views
Angular ui-router, routing problems with :id. $stateParams empty
in my routes(states) config I have:
state('users', {
abstract:true,
templateUrl: '/path/to/template.html',
access: { isPrivate: 0 },
resolve: {
...
0
votes
1answer
32 views
AngularJS CSV File Download from API
I have an admin control panel where admin users can set a few options and then click a button to run a report. The report should return a CSV file download prompt to the user.
I am using ui-router ...
0
votes
1answer
21 views
Controller on nested state not getting executed
I have nested states, with the parent and child state having a separate controller. But only the parent state is getting executed.
I have the url structure: #/restaurant/2/our-food
So, I want it to ...
0
votes
0answers
16 views
When using angular-ui-router, what is the suitable structure for controller?
Before use angular-ui-router, one controller always support several router&views, such as:
$routeProvider.
when('/posts', {
templateUrl: 'views/posts/list.html'
}).
...
0
votes
1answer
53 views
Angular-ui-router state.transitionTo routes to an empty:id (/users//)
where It should route to /users/me/ and Instead it routes to /users//
if I manually write the /users/me/ url or use a link to move there, everything works fine. but transitionTo doesn't Do what I ...
0
votes
1answer
27 views
update the path in the url when a model changes using angular
I'm trying to update the url in the address bar when a model changes, but when I ue $location.path(new_path) it changes real quick then changes back.
$scope.$watch('foo', function(newVal){
...
2
votes
1answer
37 views
Injecting $state (ui-router) into $http interceptor causes circular dependency
What I'm trying to achieve
I would like to to transition to a certain state (login) in case an $http request returns a 401 error. I have therefore created an $http interceptor.
The problem
When I ...
0
votes
1answer
16 views
Using resolve return as state parameters
I am writing an SPA application using AngularJS and UI-Router. What I am trying to achieve is to use the result of the resolve method in the landing controller as state parameter for the same state.
...
0
votes
1answer
33 views
Filter data using query string parameters
I have 2 files:
module.js with the following code:
angular.module('App.fragments.Jobs', []).
config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('jobs', {
...
1
vote
1answer
32 views
Can I access AngularJS module config values in the template?
I have a special value I would like to access in the home.tpl.html template. Can this be done as a {{magicHappened.mySpecialValue}}, and if so, how? The value is the final argument in state().
Of ...
1
vote
0answers
19 views
ui-router global state with “main view”
can someone please point me to an example of managing global states for ui-router?
i'm trying to implement a general site template that contains on all pages a header and a footer, with a main view ...
0
votes
0answers
62 views
Updating title tag using AngularJS and UI-Router
I am running into a weird issue while trying to set the title of the page using the name of the current state (via ui-router).
Actually, the issue is not with setting the title, the issue is that ...
0
votes
1answer
74 views
Cannot call method 'insertBefore' of null error
I'm getting this error in angularjs with ui-router. I have no idea what is setting it off and I can't track it down. Has anyone run into this before or know anything about it?
I am using yeoman with ...
0
votes
1answer
27 views
Angular JS event for page rendered using ui.router
Background Scenario:
I have an ng-repeat that populates my view, dynamically enlarging the <div> container.
I need to adjust the height of my <div> when the rendering is complete, ...
0
votes
1answer
27 views
AngularJS + ui-router - lightbox overlay with deep links
I'm trying to use AngularJS to create a lightbox which contains url deeplinks. This works fine, but I need to name it for every page I want it to work on with the template behind it.
I can get this ...
0
votes
1answer
70 views
AngularJS ui-router $state.go() not triggering state when “views” property is used
I have two parallel views in my AngularJS template. One is the main page view and the second is the navigation bar view. If user is logged in, I display private data in the main view as well as a link ...
1
vote
0answers
46 views
Two different animations for route changes
I have the following case: I'm using the ui-router for the routing in my AngularJS application. In one route, there are five child states for different subscreens. I want to animate the transition ...
1
vote
0answers
57 views
ui-router - reloading current state
I am wondering how to "reload" a current state, passing in a new parameter so that my controller gets re-initialized.
I am trying to implement a search in my sidebar control - and the initial ...
1
vote
2answers
58 views
stop angular-ui-router navigation until promise is resolved
I want to prevent some flickering that happens when rails devise timeout occurs, but angular doesn't know until the next authorization error from a resource.
What happens is that the template is ...
2
votes
1answer
54 views
angular ui-router and view context update
i'm new to ui-router;
Say i have a "pageTitle" ui-view with template like <p>{{ count }} results</p> in my AngularJS ui-router application.
How would a controller update this view ...
0
votes
2answers
41 views
Can I modify the url that is constructed from ui-router?
I'm currently using ui-router to manage my routes in my angularjs app, and I was wondering if there was a way to modify the url that gets created.
Its better explained with an example.
I have the ...
0
votes
0answers
48 views
Validating form with Angular ui-router nested views
I'm trying to add a 'kickstarter-form' button menu to my app as follow: where I have separated my form into 3 nested pages with ui-router, which is pretty cool so far.
Here is my plunk > click on ...
0
votes
0answers
46 views
angular UI Router - when to use abstract mode / nesting/named views?
Couldn't figure this from the docs:
My use case: A big SPA, with multiple "widgets" or "apps" on a page - Each with a controller, data and template. preferably each of those should be a view. ...
0
votes
0answers
45 views
Define the onEnter and onExit callbacks in another file with Angular UI Router
I have a simple application using Angular UI Router with some states.
Actually I have this kind of code in my router :
$stateProvider.state('map.layers', {
url: '/layers',
templateUrl: ...
0
votes
1answer
43 views
How can I have a default sub view show up when I am using Angular ui-router?
I have the following states defined:
var test = {
name: 'test',
url: '/test',
views: {
'page': {
templateUrl: ...
1
vote
1answer
157 views
Pass data to state with $state.go in angular-ui-router
I'm making a document editor. Documents can be Type A or Type B. They are accessed by url by document id, but the id does not make it clear if the document is of type A or B.
So, I need to load the ...
0
votes
1answer
53 views
How do you use inherited params in angular ui-router?
I have a URL parameter that I want to exist in all states. The parameter is 'asUser' and it allows admins to look at the app as another user. I tried:
$stateProvider
.state("root", {
params: ...
0
votes
0answers
45 views
Angular ui-router onEnter function not firing
Thanks to some great help from the SO community, I have a working angular SPA that uses multiple states/views using the ui-router library. However I am getting a behavior that seems at odds with the ...
0
votes
0answers
141 views
AngularJS 1.2 + ui-router
I am trying to migrate from Angular1.0.6 + ui-router to Angular1.2.
But unfortunately my ui-router implementation seems to be not working with angular1.2
To be noted, everything (ui-router) is working ...
0
votes
1answer
89 views
Angular ui-router's ui-sref created dynamically in a directive?
I am working on a line of business application that is using Angular to create a SPA around a Node.js api server. I decided on using ui-router cause of the state-machine and their intuitive way of ...
0
votes
1answer
68 views
What is the difference in angularJS between ui.router and ui.state?
I am working on getting an angularJS SPA setup with multiple views using angular ui-router.
As I look aroun dthe web at tutorials and how-to's, I see a mixed bag of dependencies. The ui-router github ...
0
votes
0answers
64 views
Routing to Tab based interface with angular-ui and angular-ui-router
I read a lot of issues on the Github page of ui-router and i decided to get some input (sry for one more tab example)
I am creating an interface which is based on tabs (based on angular-ui).
I have ...
0
votes
1answer
57 views
Restangular and local storage
$stateProvider.state( 'clientinfo', {
abstract: true,
url: '/clientinfo',
resolve: {
clients: ['Restangular','localStorageService',function(Restangular,localStorageService){
...
0
votes
0answers
98 views
How to navigate to a child state using parameters from a factory using Angular.js and ui-router?
I'm trying to get angular ui-router to navigate to a child state using a parameter supplied by a factory which has a default parameter at the start in order to preserve the parameters across the app.
...
0
votes
1answer
73 views
Angular JS promises, JSON data and funny timings
I'm really struggling with the promises here.
It's more than a day now, and I still can't figure it out.
I'm new to Angular and, more in general, to the promises "concept", so I'm sure there is ...
1
vote
1answer
92 views
UI-Router : Can I get always the same controller?
I'm using UI-Router to have some "menus" in my application.
$stateProvider.state("list"
url: "/Focales"
templateUrl: "/demo/focals.html"
controller: FocalCtrl)
...
0
votes
1answer
96 views
Using $routeProvider with $stateProvider
in beginning I was just using $routeProvider as follows and it was giving me what I wanted.
angular.module('angularProject', ['angularProject.filters', 'angularProject.services', ...
1
vote
3answers
70 views
Is there a way to pass variables to a controller from ui.router?
I have a page structured with some nested views, using ui.router and I would like to pass some data from the parent controller to the child controller, without injecting useless services into the ...
0
votes
1answer
61 views
How do I set child state with stateParam in ui-router
I have been struggling for sometime for following scenario to work right.
I am using ui-router with angularjs and I need something like:
Parent state : .state('parent', { url: '/parent/:someUserId' ...
0
votes
0answers
185 views
Multiple Nested ui-views with ui-router and AngularJS
I just want to start by saying I looked through as many stack overflow questions related to this issue as I could find and I haven't seen any questions in regards to the issue I'm having. Some are ...
0
votes
1answer
35 views
angularFireAuth with ui-route
I'm trying to use angularFireAuth (from AngularFire - Firebase) with ui-route.
The problem is that the angularFireAuth needs ng-route as a dependency, so I will have to include it in my module.
The ...
1
vote
1answer
115 views
Angular ui-router fails to resolve named dependencies
I recently migrated from ui-router 0.0.1 to 0.2.0. Since the migration, ui-router fails to resolve named dependencies that needs to be injected into a view's controller. Here's the sample code which ...
1
vote
1answer
81 views
Nesting routes in Angular UI Router
(AngularJS v1.2.0-rc.3 + Angular UI-Router v0.2.0)
In my index.html, I have the following code:
<div class="container" ui-view></div>
In my app.js, I have the following code:
...
0
votes
1answer
118 views
Nested ui-views not working in Angular 1.2.0-rc.3
I've been trying all day to get the AngularUI Router working with 1.2.0-rc.3, but to no avail. I'm pretty sure it's a bug, as a lot of things have been changed in rc3, but maybe someone has found a ...
0
votes
0answers
47 views
Resolve $http request before running app and switching to a route or state
I have written an app where I need to retrieve the currently logged in user's info when the application runs, before routing is handled. I use ui-router to support multiple/nested views and provide ...
0
votes
1answer
45 views
Using ui-router with ngTouch
I'm making an Angular.js site using UI-Router. However I also need ngTouch to eliminate the 300ms touch delay on devices..
Ui-router recommends you use the ui-sref directive to navigate. ngTouch ...