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.
7
votes
0answers
853 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 ...
4
votes
0answers
131 views
How to use ui-routing with ionic slide box?
The ionic slide box requires routing with the script tag like these:
http://codepen.io/calendee/pen/Kbpyg/
Here, it is accomplished by using the <script> tags and giving id attribute as ...
4
votes
0answers
591 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
75 views
Angularjs ui-router authorization and authentication for different roles using same url
I'm developing an app in angularjs using ui-router. I've followed https://github.com/alarv/ng-login repository to handle authorization and authentication.
I have 3 user roles handling 3 different ...
3
votes
0answers
233 views
Ionic ion-nav-view inside a slide-box
I'm trying to build two parallel apps inside a slide-box. This means the user should be able to use the slide-box to easily switch between the two apps while the apps maintain their (separate) state ...
3
votes
0answers
384 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 ...
3
votes
0answers
171 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 ...
3
votes
0answers
112 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
310 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 ...
3
votes
0answers
401 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 ...
3
votes
0answers
464 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 ...
3
votes
0answers
500 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
78 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
1k 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 ...
2
votes
0answers
19 views
AngularJs Url changes but old view is loaded using ui-router
I am using ui-router and I have a setup like this
In app.js I have the following
$stateProvider
.state('TechReadiness', {
url: "/Dashboard/TechReadiness",
templateUrl: ...
2
votes
0answers
49 views
Ionic not loading view linked to tab on first click
The first page that loads in my ionic app is a welcome screen with two tabs that link to a 'log in' page and a 'sign up' page. Upon first loading the app the first tab is already highlighted, and ...
2
votes
0answers
67 views
Synchronise back-end url routing with front-end url routing
Maybe my title is not the best. Let me explain.
So, I've got this angular app that have some URLs bound to controllers.
And also a backend app(it's Django, but it doesn't matter much).
I want to ...
2
votes
0answers
72 views
Prevent reloading parent controller in ui-router
I have a problem with nested views in ui-router.
My layout is :
site.search
-----------------
site.search.runs
-----------------
site.search.runs.scheme
-----------------
...
2
votes
0answers
21 views
Angular UI Router Not Animating States?
Having a major issue with Angular 1.3.15 and UI Router 0.2.15, they aren't animating my state changes or anything. I am not sure what is going on. I simplified my CSS to just animate in and out but it ...
2
votes
0answers
54 views
ui-router stateChangeStart per state
Is there any way to specify a $stateChangeStart per state?
For example, I can use this global $stateChangeStart event to capture state changes and reject particular ones:
...
2
votes
0answers
41 views
Controller scope value not updated via ng-model
I just remove ngRoute for using ui.router.
My routeProvider became $state provider :
/*
$routeProvider.when('/login', {
templateUrl: 'views/auth/connexion.html',
controller: 'ConnexionCtrl'
});
...
2
votes
0answers
134 views
Angular and Material Design Light
I'm triyng to implement MDL in a simple Angular app.
The issue is that even if I put the MDL javascript file before the angular javascript files MDL components that rely on MDL doesn't work.
This is ...
2
votes
0answers
99 views
Explain why this doesn't work? Removing dependency in angular breaks app
I've been working on some boilerplate stuff and ran into something peculiar.
I have a module and it works fine:
define([
'angular',
'angular-couch-potato',
'angular-sanitize',
...
2
votes
0answers
42 views
Ignore parameters on page tracking using angulartics
I'm using Ui-router and in severals $states I have a parameter as a Guid like the example bellow (":numeroSolicitacao"):
.state('solicitacoes/aprovacoes', {
url: ...
2
votes
0answers
53 views
Angular UI Router not resolving one service before another
I am trying to create a tag layout filled with categories, but I am not getting my Authentication because I am trying to resolve that service in my Router.
this is my Router code
(function () {
...
2
votes
0answers
44 views
How do I write angular-ui-router code to ensure maximum compatibilty to new angular router?
For a large application I have to re-design the navigation and routing concept.
As far as I see, the new angular router, which was announced for 1.4 (and 2.0) is still not production ready. All the ...
2
votes
0answers
25 views
Keeping Leading zero's for Route-UI Query Parameters?
I am trying to use the route-ui url query to pull in two values, customerNumber and employeeID. EmployeeID has leading zeros. When I use the query url as below, it strips the leading zeros when I ...
2
votes
0answers
79 views
scalajs + uirouter how use it in the right way
I'm try to start with scala.js and Angular. For that I'm using greencatsoft/scalajs-angular (https://github.com/greencatsoft/scalajs-angular) port
I found also a good sample ...
2
votes
0answers
46 views
Browserify with AngularJs router
I have application in angularJs and it will have different modules with different JS files.for js file optimization I am going to implement Browserify .
My angularJs code is like this in app.js:
var ...
2
votes
0answers
69 views
How to control height when animating in & out using animate.css and flexbox?
I am trying to animate in/out different states using angular and ui-router. I have added animate.css and I have managed to get the different states transitioning, my problem however is that there is a ...
2
votes
0answers
233 views
How do I use ui-sref-active with bootstrap navbar-brand?
In this sample: Angularjs navigation menu with UI-Bootstrap tabs and UI-Router
The following works great for the list items on the navbar and highlights them as I click:
<ul>
<li ...
2
votes
0answers
179 views
$stateParams Query parameter undefined
I am trying to get the query parameters from my angular UI router application. However I cannot seem to get them when I use the query method. The state params are always coming through as undefined.
...
2
votes
0answers
94 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
73 views
AngularJS: help me avoid this anti-pattern: setting variables on $rootScope before $location.path
Here's something simple and I think there must be a better way: I often need to navigate to a new view, and at the same time I want to provide some context information to the scope that will be ...
2
votes
0answers
100 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
212 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
107 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
34 views
Angualr ui-router nested view vs scope variable
I have trouble to understand the benefits using ui-router vs a scope variable for a nested view in one single controller.
For example, I can easily use a scope variable to display which page view I ...
2
votes
0answers
871 views
Angular - UI Router - Nested States - Browser Back button does not work as expected
I have a scenario where I have the following nested states structure:
root
root.item1
root.item2
The root state has a template showing some variables that are set in child states. Also it needs ...
2
votes
0answers
212 views
Pagination and UI Router in AngularJS
I have AngularJS project with UI Router and I use Pagination in this project. I use directive and filter to make it by below code.
Controller
newsapp.filter('startFrom', function() {
return ...
2
votes
0answers
127 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
632 views
Angular $state.go reload: true?
Can somebody explain what exactly does reload: true when using it with $state.go in Angular ui-router?
Sometimes my data is not updated when I use $state.go after editing an object, and when I ...
2
votes
0answers
103 views
how do I edit the navigation menu in AngularJS theme?
So, I bought a template from envato market. It's an admin panel responsive theme created with bootstrap and AngularJS. I want to edit the theme. I've edited the navigation links in the nav.html file ...
2
votes
0answers
471 views
UI Router multiple url using single state
I have to use multiple url like users, users/add, users/edit into one view i.e users. I have enter the below code in my js. Though it is handling users/add, users/edit by taking add and edit as ...
2
votes
0answers
136 views
angular state.go navigation between two modules
I have two separate modules and am trying to use $state.go() to navigate between them, but without success at the moment.
Some truncated code:
var mod1 = angular.module('mod1',['ui-router', etc.]);
...
2
votes
0answers
110 views
Is there a pattern for reusing a resolver across modules in angularJS
I have a modular structure to my App meaning I have many config files with route definition in them. I am trying to use a resolver to check if the user is authenticated or not before I move them to ...
2
votes
0answers
159 views
Angular disableAutoScrolling not working with html5mode navigation
In my app I'm changing location hash # when page scrolls down. When top part of div element with id e.g. section-1 appears on screen, I'm changing hash via $location.$hash() method.
To prevent ...
2
votes
0answers
227 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
432 views
How do I reload state without doing a full refresh with angular ui router
I need to be able to re run my controllers in a state when I do a state.go without doing a full page refresh (this re-renders my entire template).
I have a button that takes me to the same state with ...