Tagged Questions
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.
0
votes
0answers
4 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
13 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
16 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 ...
0
votes
0answers
18 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
15 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. ...
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
12 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
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
8 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
16 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/...
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',
...
2
votes
0answers
37 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 ...
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
36 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: ...
0
votes
0answers
19 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 ...
0
votes
0answers
37 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: [
...
2
votes
2answers
21 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
16 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....
0
votes
1answer
11 views
How to test `$routeChangeStart` every time to check the user login statsu?
In my app, I require to check the user details, in case if the user is not logged in, then i require to redirect back to /login page. but my try is not working, where should I do this config?
my try ...
1
vote
1answer
24 views
How can I check the AngularJS UI-Router state from within another controller?
I'm using Angular's UI-Router as shown below to do URL-routing in my web-app as shown below:
$stateProvider.state('myState1', {
url: '/state1',
templateUrl: 'state1.html',
controller: '...
0
votes
2answers
23 views
How can I check the AngularJS controller from within the template?
I'm using Angular's UI-Router as shown below to do URL-routing in my web-app as shown below:
$stateProvider.state('myState1', {
url: '/state1',
templateUrl: 'state1.html',
controller: '...
0
votes
0answers
14 views
Angular JS state change injecting and deleting ui-view
I have ui-view which is using same code as other view. After researching some on the articles on stack overflow I have created a new state for my view2 which is sharing controller code with view one. ...
1
vote
1answer
10 views
How can I address the UI Router 1.0 beta 3 error “No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']”
I updated to UI Router 1.0 beta 3. I've managed to update my Angular 1.5 app to use it, but Karma is giving me an error:
No coreservices implementation for UI-Router is loaded. You should include one ...
1
vote
1answer
24 views
Project structure for large Angular application?
I am new to angular js
I want to create my project structure like this
- APPLICATION
-index.html
-app.js
-modules
-core
-controllers
-directive
-views
-core....
2
votes
2answers
25 views
angular ui-router finding issue on refresh the page
In my application, when auth success, I am redirecting to /users. It works fine, and I am in users page too. But when I refresh the page, I am getting an error as:
Cannot GET /users
What does this ...
0
votes
1answer
36 views
Take value of textbox from page-1 to page-2 using angular js UI-routing
I am trying to take textbox vale from one Page-1 to Page-2 i amusing below code ..but i am unable to do so.
Page-1.html
<div >
<div style="height: 400px">
<h2>Partial ...
1
vote
1answer
31 views
Changing $scope.variable in $scope.$on function does not update view
I want to listen for route changes and update a $scope variable to reflect the current route in my menu (md-nav-bar):
$scope.$on('$routeChangeSuccess', function(event, current) {
$scope....
0
votes
1answer
19 views
$http POST angular-Submit constant public key at the time of login
I need to submit public key with constant key value, along with username and password at the time of login.And also to redirect it some other page in ionic app- href="#/tab/abc", if login is ...
0
votes
1answer
35 views
Why controller called twice, when state changes?
This is my app.js
angular.module('app', ['ui.router', 'satellizer'])
.constant('API_URL', 'http://localhost/angular/public/api/v1/')
.config(function($stateProvider, $urlRouterProvider, $...
3
votes
0answers
45 views
Angularjs SEO improvements
What are the major points at a glance to optimize an Angularjs-Website (with ui-router)?
1.
Google is now able to render Websites with dynamic content, without the deprecated usage of their Ajax ...
0
votes
1answer
27 views
Angularjs ui route : Check permission before load view
Now I want to check user's permission before loading ui-view in angularjs.
My route.js is something like this:
$stateProvider.state('app.test', {
url: '/test',
component: 'test',
...
0
votes
0answers
16 views
Are there any examples showcasing 3 level nesting using angular 1.4?
I have been studying ui-router for angular 1.4 at 'https://github.com/angular-ui/ui-router/wiki/Nested-States-%26-Nested-Views', but I can't find an example that showcases having a child within a ...
0
votes
3answers
28 views
Unable to get routing work in Ionic app
I am unable to get routing to work for the Ionic app.
When I click on a link ('Scientific Facts') in home.html, it doesn't navigate to facts.html
I've gone through all the relevant documentation and ...
0
votes
1answer
31 views
Combining multiple ng-apps into a single app
The Problem: We have multiple angular apps running on the same page. One for the footer. One for the header and one for a login modal. Each with it's own state and each user ui.router.
The challange: ...
3
votes
3answers
68 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 ...
0
votes
1answer
34 views
Angular UI Router - state query string parameter not working
I have a very similar scenario to the angular-ui-router demo app: whenever the user tries to access a state that requires auth, there's a hook which redirects him to the login state. The additional ...
0
votes
0answers
29 views
angular ui-router change state clear sibling views
I have a problem when changing a nested state all its siblings views are cleared.
my html structure like this:
<!-- main view-->
<body>
<div ui-view="main">
</div>
...
1
vote
2answers
35 views
IONIC APP- get device id for post service($http.post)
I'm trying to get the device id getUUID at the time of app login along with username and password. Is the right way to get device id and post it to the server for login.
controller.js
....
0
votes
0answers
18 views
AngularJS and ui-router templating doesn't update ui-view
I'm trying to spin up a server.js from node and have $stateProvider host a template file (with the top bar nav + footer remaining static) and only update the container between them.
However, after ...
0
votes
1answer
12 views
Listen for a state change of AngularUI Router
I want to know if a user is going to a specific state, and I plan on using ng-animate to make it slide in.
Is there a way listen to an event that will pass the state that user clicked/changed and ...
0
votes
0answers
22 views
Angular-ui-router 0.3.2 doesn't work correct with components
0.3.2 is a new version of ui-router ui-router releases
I have tested it and looks like it doesn't work correct. Please take a look this example. Console output - Unknown provider: $uiRouterProvider &...
1
vote
1answer
15 views
ion-view not loading content
I'm using angular UI Router in Ionic to build an application but my one page news.html is not loading the content.It shows the view-title but not the stuffs inside ion-content , the page is blank.
...
0
votes
0answers
19 views
Weird ui-sref behaviour: old params still remain at URL although trying to change
This is my state definition:
$stateProvider
.state('app.reports', {
url: '/reports?param1¶m2',
templateUrl: 'app/modules/report/views/reports.html',
...
1
vote
0answers
18 views
Weird behaviour with ui-router default state
I cannot explain the behaviour as far as the default state is concerned. My code is the following:
First index.html:
<nav class="navbar navbar-inverse" role="navigation">
<ul ...
2
votes
1answer
28 views
Multiple named views not showing
I'm trying to build from scratch a very simple angular app using ui-router.
Every page will have the same appearance, and will have the following 4 sections (vertically, from top to bottom):
HEADER (...
0
votes
0answers
20 views
Angular 1 ui-router duplicating views
I've got a router setup like this:
$urlRouterProvider.otherwise(function($injector) {
var $state = $injector.get("$state");
$state.go('app');
});
$...
0
votes
2answers
10 views
Unable to get stateparams in resolve while opening modal in angularjs
I wanted to open a modal for detail view of particular user when clicked on view detail link.But I don't get the id of user in resolve attribute of $uibModal.open().But that id is available in inline ...
-1
votes
0answers
20 views
Angular js routing login page and app
Suppose I have a full screen login page with a beautiful background and all and after login rest of my app with routing. So should I create another login html page or adjust it in the routing and if ...
0
votes
1answer
34 views
Why will my angularJS login form view not display?
For some reason the view in my index.html will not display my login.html view at all. May be a routing issue. I don't really understand how to use the routing but I think I'm doing it right.
index....