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.
30
votes
0answers
464 views
Whats the proper way to set a Router & RouterLink in Angular2 Dart
Question: Whats the proper way to set a Router & RouterLink in Angular2 Dart
Here's my main.dart file:
import 'package:angular2/angular2.dart';
import 'package:angular2/router.dart';
import ...
4
votes
0answers
151 views
Replace ui-view with the loaded content
I have multiple views like here : http://www.funnyant.com/angularjs-ui-router/
And I load them in my page like this
<div data-ui-view="content"></div> --- 75% width
<div ...
3
votes
0answers
70 views
Multipage SPAs with AngularJS & Rails using ui-router
I have a Rails application in which I am trying to replace some views with AngularJS, but not all. In each view I replace, I want it to basically act as if it is it's own SPA. I am also trying to use ...
3
votes
0answers
193 views
Cannot read property '@' of null when using $state in onEnter
I am get the following error from the angular-ui-router:
TypeError: Cannot read property '@' of null
...
TypeError: Cannot read property '@main' of null
...
I have done some research on what could ...
3
votes
0answers
76 views
Angular UI Router - allow ANY query string parameter
I am using the Angular UI Router and this works well in most situations. However, I have a situation where I don't know the names of the query string parameters ahead of time.
So normally with UI ...
3
votes
0answers
884 views
ionic tabs and side menu history
I would like to place a tabbed view inside side menu app, but just in some views of the app. In an app there is the following state structure:
|--- Login (login: menuContent)
|--- ...
3
votes
0answers
153 views
Unable to get Angular html5mode and UrlRewriteFilter working with certain URLs
I'm using an AngularJS 1.3 webapp with a Java/Jersey REST API. I finally got html5mode working with the Tuckey UrlRewriteFilter so that something simple like localhost:8080/#/page is now just ...
3
votes
0answers
432 views
ng-animate with ui-router when using $state.go
I'm using Angular 1.2.18, ng-animate 1.2.18 and ui-router 0.2.10 (but I've tried with latest build from git repo). When I enable animations and define my transition css, it all seems to work fine, if ...
3
votes
0answers
212 views
angular ui router places query string before hash
I have an application that uses an external payment provider to buy credits. After a successful purchase the payment provider redirects to http://any.url/?orderNr=xxxx&outcome=SUCCESS. This url is ...
3
votes
0answers
72 views
How should you handle major UI transitions when data changes?
My team and I are building a medium / large size AngularJS application and the controllers and views of a single page view can change dramatically depending on the data in 1 field:
if (order.state == ...
3
votes
0answers
2k views
RequireJS + AngularJS + Module: Dependency issues
I had my angularjs app setup in local and everything was working fine till I upload my code to the staging server. I now have issue with dependencies that are not respected but I can't see why. I ...
3
votes
0answers
919 views
How to lazy load views using ui-router and requirejs
I would to use https://github.com/angular-ui/ui-router with http://requirejs.org/ and load views only when they are needed. I have found the following example: ...
3
votes
0answers
2k views
ui-sref not working with ng-click (angular-touch) if used without jQuery
I have a hard time removing jQuery from our app. The main problem: a simple link combining ng-click with ui-sref:
<a data-ui-sref="main2" data-ng-click="reportClick()">Link</a>
The ...
3
votes
0answers
2k views
Stop angular ui-router from reloading state's template and controller, if only params change?
I have state defined like:
.state("root.home.foo", {
url: "/foo/:id",
templateUrl: "/static/partials/home.foo.html",
controller: 'FooCtrl'
})
When in that state, I respond to a mouse ...
2
votes
0answers
23 views
AngularJS ui router - authentication resolving results in stalled request
For some reason the combination of Angular's ui router and authentication doesn't work for me.
The app state is first to be resolved by logging in, but when it is resolved the GET request of the ...
2
votes
0answers
35 views
How to nest multiple ids in a state url?
I am trying to have a state that I can cold navigate to and not lose the structure of a breadcrumb trail. Ideally the url would look something like this:
site.com/stuff/id1/id2/id3/id4/id5
where ids ...
2
votes
0answers
50 views
Angular + Ui-router: $stateParams is empty inside Interceptor when using resolve
What I want to achieve:
Send a token that I get from the url stateParams with every request. For this i'm using an http Interceptor.
The interceptor looks like this:
.factory('myInterceptor', ...
2
votes
0answers
57 views
AngularJS ng-repeat not rendering $resource
I'm working on an Angular app that includes a user feed page, one of the items on the feed is a list of groups that the user belongs to. The groups are pulled from the backend through a $resource ...
2
votes
0answers
50 views
access resolve data on $state.go() with notify false
I have an interactive map, with categories and markers associated.
I also have a search form, which allow users to search for markers.
When the user clicks on the result he wants to display, I want ...
2
votes
0answers
217 views
Using Adobe Edge Animate with AngularJS and AngularUI Router
I'm working on a project at the moment which will incorporate multiple animations created with Adobe Edge Animate into an single AngularJS application. The idea is that these animations will act as ...
2
votes
0answers
159 views
Angular UI-Router Not Resolving with Internet Explorer 9
I have an Angular v1.3 application, which uses Angular ui-router v0.2.13 for all routing. The site works great on all browsers, including IE 10 and IE 11, but not IE 9 (we've decided not to pursue ...
2
votes
0answers
451 views
$locationProvider.html5Mode(true) issues
been dealing with some $locationProvider issues that I am stuck on. I've got a simple single page page. But I'm getting the following error:
TypeError: Cannot read property 'replace' of ...
2
votes
0answers
82 views
How to use modal dialog of bootstrap to prevent default on angular -$locationChangeStart
I am trying to use modal dialog of bootstrap to ask for confirmation to navigate when the page is in edit mode.
I am using $locationChangeStart event to find out change in navigation. I am using a ...
2
votes
0answers
182 views
cordova and angular ui router : How to detect if state change was a back action
In one of my state's controller, I have been calling a service that uses an API to get data from the server.
Now the problem is, the service gets called everytime the state changes. When the user ...
2
votes
0answers
96 views
Angularjs - ui-router with dynamic number of parameters
we have a requirement like this. we use ui-router
#/plan-details/unlimited
#/plan-details/unlimited/country-id/10024
#/plan-details/local/county-id/12322
...
2
votes
0answers
99 views
Common query parameter binding with angular ui router state
Is it possible to define a state which matches for any url having a common query parameter.
$stateProvider
.state('home', { // First state
parent: 'base',
url: '/',
...
2
votes
0answers
76 views
Issue when refreshing page - Incorrect state
Whenever I reload the browser when in my angular application, I lose the current state of the application. I am generating my routes dynamically based on information I get from a WebApi controller, so ...
2
votes
0answers
119 views
when use hard refresh (ctrl+f5) get error in angularjs and requirejs
I have a angularjs application , I use requirejs to load modules and files all the thing right when I refresh site with Ctrl+f5 but when I refresh with f5 I got some error ! is there anybody knows ...
2
votes
0answers
112 views
callback when ui-view animation is done
I'm using angular in an app together with ui-router. I wish to be able to execute some code, when the animation of the ui-view is complete. I've read that $stateChangeSuccess should be able to achieve ...
2
votes
0answers
225 views
Unexpected token when refreshing page using Html5Mode
I'm using Html5Mode(true) in my AngularJS app. This works fine when I browse to my website like this:
http://www.example.com
This then gets transformed to:
http://www.example.com/home/index
And ...
2
votes
0answers
113 views
ui-router: Prevent resolve to be resolved when activating a state in one of the resolve
In the home state, I have a function that checks if the current user is authorized along with other promises.
resolve: {
authorize: ['AuthService', function (AuthService) {
...
2
votes
0answers
332 views
Working with Ui-Router-Extras
I have an ionic/angularjs/ui-router app that has a couple of intro/onboarding screens that leads into a home page with an accordion list of items. If I expand (for example) item 7 in the list(on the ...
2
votes
0answers
137 views
Why isn't angular-ui-router updating my nested states? I have to refresh
I have a state on initial signup localhost:3000/#!/ that will show a splash page for new users to sign up. Then after you register and then login, I keep that same url, and have a nested partial view ...
2
votes
0answers
309 views
How to prevent user from navigating away when form is dirty
I have an angularJs app that requires authentication for most pages. I've implemented the checks similar to http://www.frederiknakstad.com/2014/02/09/ui-router-in-angular-client-side-auth/
In ...
2
votes
0answers
283 views
How to get an instance variable from rails using angularjs and ui router?
I'm using a template in my state router. I want to get an instance variable from my rails server, but it doesn't have it's own path, so I can't use Restangular or something like that. Also, when I ...
2
votes
0answers
148 views
Loading AngularJS controller code on state change using ui-router (lazily)
I'm working on an AngularJS app with a Rails backend. Using the Rails asset pipeline, I've been able to organise my javascript files quite nicely, but I've landed at a point where the amount of ...
2
votes
0answers
217 views
UI-Router $state doesn't change the URL or state
Here is my config page for my states:
//
// THESE ARE THE GUEST ACCESS LEVEL AND ROUTES
//
var guest = [];
guest.push({
state: 'guest',
abstract: true,
url: '^',
templateUrl: ...
2
votes
0answers
246 views
ui-router - Default substate based on data
I have a list of modules with module detail on the right side.
div
ul
li(data-ng-repeat="module in modules")
a(ng-href="{{getModuleHref(module)}}")
div(ui-view)
Both module list and ...
2
votes
0answers
174 views
stop loading parent state controller on changing optional parameters of child states in ui-router
Im facing an issue in UI-router service for Angular JS. While loading child state, with different optional parameters making my parent state's controller loading. I don't want this, because it is ...
2
votes
0answers
110 views
Maintain $cookies/$cookieStore in Angular ui-router after reloading from browser
Problem:
After reloading a page using a browser I lose my $cookies/$cookieStore that were set on a my page. What i want is to access those $cookies/$cookieStore values.
My guess is that ui-router ...
2
votes
0answers
21 views
Is there a way to get a child state's stateParams in the parent state?
Let's say I have state accounts with controller accountsController and url /accounts
and a child state accounts.details with controller accountsDetailsController and the url /{accountId:[0-9]{1,4}}
...
2
votes
0answers
255 views
How can I have angular-ui-router with a blank ui-sref attribute?
I'm writing a dropdown nav in bootstrap and angular with angular-ui-router. When a link has a dropdown, the link should be blank. But if I pass a blank route to ui-sref I get an error.
Here's a ...
2
votes
0answers
222 views
AngularJS ui-router update template state on error
I'm trying to replace the template of a state when the resolve promise catch an error, any way to do that?
For example:
.state('mystate', {
url:'/mystate',
resolve: {
myObject: ...
2
votes
0answers
734 views
Trouble understanding UI-Router and nested views
I'm setting up an AngularJS app using Angular UI Router using states.
In my app there are multiple pages, and two of them have a tabbed view. So I'm using nested views to display the pages that have ...
2
votes
0answers
544 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 ...
2
votes
0answers
244 views
AddThis conflicts with AngularJS URL state
I'm currently using Addthis's api to dynamically initiate buttons. Basically addthis.init() and addthis.button().
When I open up say the email option or any of the modal/popup boxes options. This ...
2
votes
0answers
556 views
Angularjs ui-router: Rewrite location with default parameter resolved
I have multiple nested states. Let's say:
departments:
/departments/:idDepartment
departments.group:
/group/:idGroup
departments.group.category:
/category/:idCategory
Each state has a resolve to ...
1
vote
0answers
42 views
Controller called multiple times
So MyController.js get called multiple times (the setup is executed twice) and I can't figure out why.
I know there is two nested ui-view in MyControllerTemplate.html but without them my templates ...
1
vote
0answers
22 views
AngjularJs current user solution
I am new to AngularJs. My question is how to store current user data after user logged in?
I have come across lots of solutions recommending the use of service, and inject the service into ...
1
vote
0answers
13 views
Ionic tabs navigation issue
I'm using both of the Ionic framework and IU router to make a better navigation for you my first web application.
Here a simple architecture so you can easily understand the structure :
The ...