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.
13
votes
2answers
191 views
Angular ui router multiple views with route(state) parameters
I have a page where I show 2 different lists of products using multiple views with each having a controller and template file. My state definition is like this:
.state('all_lists', {
url: '/...
0
votes
1answer
14 views
ui-router demo project not working with components
wanting to use state based routing I tried the sample project from ui-router here:
ui-router demo
It works, but only as long as this reference to the pre-release library is made:
<!-- ...
0
votes
0answers
18 views
How to handle unknown urls in ui-router
Ok so my problem is that I´m not in control of the links fully (comes from a cms).
We have 3 possible types, category, product and cms, so we dont really know if the url "/gear" is a cms or category ...
0
votes
1answer
10 views
Prevent state reloading when changing states ui-router
I understand this has been asked and answered in multiple posts but I have attempted the solutions and still can't quite get there yet.
I have a few components that I'm routing between with ui-...
14
votes
4answers
25k views
Default route for angular ui router
The sample demo of the angular ui router has this link for the start page:
full url of 'ui-router' is / or http://angular-ui.github.io/ui-router/sample/#/
full url of 'about' is /about or http://...
0
votes
0answers
12 views
$stateProvider and browser refresh
I am new to ui-router.
Started experimenting with $stateProvieder.
One thing surprises me is that whenever I refresh browser unlike $routeProvider, $stateProvider blanks the whole browser window.
...
1
vote
1answer
184 views
ui router loading all views
I've got my ui router working the way I want... ultimately, but it seems like when it loads a new view...it also temorarily loads all the other views in that state, and then quickley erases them. ...
0
votes
0answers
9 views
Multi-child states form and autoload child state
I have multiple states with components, something like this: https://plnkr.co/edit/Ah6To1rpQjrMXgtGHZ7T?p=preview
What I want to accomplish is:
When I get to the index.form state, I would like to ...
0
votes
0answers
24 views
Angular UI-router add state conditionaly
I am using Angular UI-router and would like to add state if user has privilege to view page.
Example code, for module1.route.js:
(function() {
'use strict';
angular
.module('...
0
votes
0answers
24 views
Angularjs - how do i make splice work properly in ui-router?
I'm working on inserting and removing datas from a table using ui-router. I have 3 html files: index.html, 1_input.html, 2_output.html
I'm having trouble removing data from table row. Still can't ...
0
votes
2answers
21 views
Issue in getting user details and checking of roles in resolve
I have a app for which I use cookies to store the access token and get the user details by using API getUser(accessToken). Consider a scenario where the user has logged in and I have access token in ...
0
votes
0answers
15 views
How to test Angularjs route's resolve value on component?
I'm using [email protected] and resolve some resource at the route level for one of my component. The component works as expected but my test fails now.
Error
PhantomJS 2.1.1 (Linux 0.0.0) module ag....
0
votes
0answers
11 views
Angular ui-router can't load on laravel
I have a problem with my Angular Ui-Router on Laravel
First on my routes.php
Route::get('/', function(){
return View::make('index');
});
and my app.js
var app = angular.module('pesanLabApp', ['...
0
votes
1answer
1k views
Navigate to next page in ionic on-swipe-right
I want to got to next page of the blog list when swipe right.
my view is:
<p on-swipe-right="onSwipeRight()" ng-bind-html="blog.content"> {{blog.content}}</p>
and controller function ...
-2
votes
0answers
19 views
Why login view nestes to other view?
Why state 'auth' view nestes to other view? When i go to '/auth', login view nestes to main state.
enter image description here
$urlRouterProvider.otherwise('/auth');
$stateProvider
....
0
votes
0answers
36 views
UI-Router - Basic url mismatch
All states work well from one to the other, but I have some issues with refreshing them :
refreshing /products/verandas leads to /warranty/verandas
refreshing /products/pergolas leads to /warranty/...
2
votes
0answers
28 views
Unknown provider: $stateProviderProvider in ui router testing
I'm trying to write test case for the Router in my angular app.I'm using "angular-ui-router": "0.3.1",
Below is the setup and a sample test case :
beforeEach(angular.mock.module("ui.router"));
...
0
votes
0answers
12 views
Angular - Ui-router - How to make both parent and child controller load
Hi I am hoping someone could help me out.
I have these states and my intention is that I want the rootController to be initialised to resolve user then for it load the child controller in this case "...
0
votes
1answer
21 views
angular ui bootstrap modal opened in state, how to close in controller?
Hi there I am trying to create stateful modals, using ui-router and ui-bootstrap, I have the modal opening successfully like this,
.state('static.login', {
url: '^/login',
onEnter: ...
0
votes
0answers
76 views
socket.io and ui-router change state
I found some question about this, but no proper solution.
I want to accomplish something looks theoretically simple:
I have 2 views (ui-router states):
"list" that shows a list of documents with "...
0
votes
0answers
23 views
AngularJs URL with a parameter
Users of my app have a wristband which has an NFC tag. NFC tags can be encoded with a URL, but then I have to use the same URL for all aspects of the app.
The user presents the wristband at various ...
0
votes
1answer
18 views
Ionic loader: $ionicLoading.show() issue, loader not getting called on first time
I am having this weird problem with $ionicLoading directive. I am trying to show loader on every state change.
.run(['$rootScope','$ionicLoading', function ($rootScope, $ionicLoading){
$rootScope.$...
0
votes
0answers
14 views
Ui-Router absolute URL takes to the parent state/URL
I'm using ui-router and set up routes(see below). I face the problem listed below.
when i first type this url : localhost/service/#/account-summary/billing/32 it takes me to localhost/service/#/...
0
votes
0answers
25 views
Error shows if I enable html5Mode in angular
I am using $stateProvider for routing. If I use
$locationProvider.html5Mode(false);
then by default error page opens. If I enable html5Mode then in error page then this error message comes. How can ...
0
votes
0answers
17 views
Ui Router 1.0, Pass parameters through ui-sref
In the new [email protected] I'm trying to pass parameters through ui-sref.
Example: ui-sref="login({tab : 'client'})"
This is not working in the subsequent components controller.
ex: ...
0
votes
0answers
12 views
http://localhost/home not resolving where http://localhost/#/home is resolved
I am not able to resolve http://localhost/home where http://localhost/#/home is resolved
app.js
The following is the app.js file
'use strict';
var sdm = angular.module('sdm', ['ui.router']);
...
0
votes
0answers
18 views
Angular UI Router: ui-sref does not render render the page I'm trying to route to, but it appears in my dev tools
I've been banging my head against the problem for embarrassingly long now. I'm using Angular UI Router to handling the routing in a small personal project I'm working on, and I have a strange issue. I ...
1
vote
2answers
2k views
Error: Invalid state ref '' , when using ui-sref in angular
I'm using the ui-router for the state transitions and I ran into an issue and not able to resolve it.
When I use ui-sref to go to the child state it gives me this error
Error: Invalid state ref ''
...
0
votes
0answers
23 views
angularjs cache not working with ui-router
To implement cache I am using
RestangularProvider.setDefaultHttpFields({cache: true});
but it works only for the same state, when state is changed using $state.go, cache does not work and all API ...
0
votes
3answers
20 views
UI router cannot resolve state error message
I am working on angular application at the moment, using ui-router and I am getting the following error message.
Error: Could not resolve 'static.about' from state 'static'
and I am not sure why. ...
26
votes
4answers
35k views
Angular ui-router get asynchronous data with resolve
I want to display a form with data corresponding to the edited item. I use ui-router for routing. I defined a state:
myapp.config(function($stateProvider) {
$stateProvider.
.state('layout....
0
votes
0answers
17 views
How to load individual modules in side menu depends on user roles and permission in Angular JS?
I have a side menu like each menu Item is one individual module(ng-app).
I am loading this modules using providers in sidemenu (amgularProviders).
For that I follow this blog http://blog.fragaria.cz/...
7
votes
1answer
118 views
Angular 2.0 router navigation not working on iOS WKWebView
Because of some performance issues, I'm trying to upgrade an angularJS2/phonegap app to use WKWebView on iOS.
Unfortunately, any calls to route navigate do not work. This includes routerlink and ...
0
votes
0answers
16 views
Run controllers only after initialization is complete in AngularJS with angular-global-resolve
I am having a problem where my controllers are running before initialization of my app, and I came across this NPM package that works almost perfectly. The only problem I'm having is the ...
1
vote
0answers
13 views
How to set abstract routes as children of an abstract route?
I am having a problem where my controllers are running before initialization of my app, and I came across this solution. The problem is I have several abstract routes and setting those abstract ...
2
votes
0answers
38 views
angularjs cordova base href
trying to set the correct base href value for an angularjs html5 web app to work in cordova
initially using $locationProvider.html5Mode(true) with <base href="/">:
app works perfectly in a ...
3
votes
3answers
71 views
Use “/” as Optional Separator for Parameters in Url - Angular-Ui-Router
I've a tricky issue that I was not able to solve in a while.
Essentially, when I'm on a certain $route and I do a certain $state.go(routeName, params);, I need to append a certain parameter or ...
2
votes
1answer
7 views
Minified files and ui-router
I used ui-router, when the file is not minifed or when I used the already minified file everything is working.
But I have a gulp task that takes all the library and minify them using "uglify()" (this ...
0
votes
0answers
39 views
How to get data from Route or ActivatedRoute when subscribing to router.events.subscribe in Angular2?
I'm trying to get the data from a Router whenever the Route changes but I'm not having success. Here I set the asdf property
@NgModule({
bootstrap: [AppComponent],
declarations: [
...
0
votes
0answers
9 views
AngularJS with dynamic stateful views / routes
TLDR; Is there any way for me to automatically keep routes from unloading and keep state preserved?
I am trying to build a client-side application where I want to be able to keep state (data, in-...
0
votes
0answers
43 views
AngularJs ui-router current state is empty when reload the browser (press F5)
My issue is that when i enter the route in the browser addressbar or press the F5 button i allways redirected to 'workspace' beacause the $state.current is allways empty like this:
{ name: "", url: ...
1
vote
1answer
16 views
UI-router throw error as `Invalid state ref`, when adding link to `ui-sref'
for the following route :
.state('user', {
url:'/user/:userId',
templateUrl : 'app/views/pages/user/user.html',
controller : 'userController as user',
...
0
votes
0answers
12 views
Response for preflight has invalid HTTP status code 403- ionic app error
Hey getting error mentioned above. It is running fine on mobile but not on browser.preflight has invalid HTTP status code 403. Backend developer says he has coded everything perfectly at the backend. ...
0
votes
0answers
20 views
How to reduce the Page load time of angular-meteor based web application in mobile?
I'm developing a web application using angular-meteor 1.x where accesses are almost always from smartphones. On average loading the css and js takes 3 seconds, but the application is only ready for ...
8
votes
2answers
859 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 IE8,...
1
vote
2answers
538 views
Angular 2 Component routing
I am planning to start learning angular 2 component router.
I have used Angular ui-router heavily.All my projects uses UI-router complex features like nested states and nested named views.
What will ...
3
votes
1answer
66 views
Disable URL change with UI-Router in Angular?
Is it possible to configure ui-router in an Angular 1.5 application to completely ignore the address bar?
Desired behaviour is something like this:
Navigating between states via UI does not change ...
2
votes
2answers
22 views
`ui-route` - not able to redirect and not geting the `url` of current state
In my application I am running a function after route-config. in the function i am checking the login status, and accordingly trying to redirecting to login page. But it's not working,
here is the ...
0
votes
0answers
17 views
ui-router - reuse controller and template instance for state
I'm using ui-router and when I switch between one state to another it always creates a new controller and its corresponding html, this is all fine and expected.
However in my case there is a state ...
0
votes
0answers
12 views
md-nav-sref not working in md-nav-item
I am using md-nav-bar and can get it to work with md-nav-href. It switches routes when you click on a md-nav-item. However, it does not reflect a) URLs in the browser and b) programmatic route changes....