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.
1
vote
1answer
14 views
changing the view of the div using angular ui-router
Here is the code which i have written so as to change my view (without any change in the url)
<a ui-sref="chat.menu" ng-click="click1();">Latest</a>
<a ui-sref="chat.menu" ng-click="...
1
vote
0answers
12 views
AngularJs Communicate between views belonging to the same state ui-router
I am working in AngularJs project and i am using ui router to generate nasted views.So i have one state generating multiple views ,My question is how can I communicate and send data between views ?
I ...
0
votes
1answer
17 views
How to associate a unique ui-sref to every items in a dynamic list?
I have a pagination system composed of items I retrieve from a JSON file. I can add/remove any of them. I want to associate to each of these items a link to a configuration view (each item has the ...
0
votes
1answer
40 views
ui-router angular js does not work
I am new in angularjs and I was creating new app,and when tried to use ui-router I failed I don't no why it's not working. Actually my error is this when I use ui-view to render some partial(...
0
votes
0answers
9 views
How to write htaccess for prerender with Angular and wordpress
I am using Angular in combination with wordpress. I am trying to make prerender work but I don't know how to implement it. Whenever I attach ?_escaped_fragment_= to the end of the url it just shows ...
0
votes
0answers
19 views
Angular UI Router - Load View With Controller Embedded
Instead of doing two $http requests, one for the controller data and one for the view data, how come I can't just load a view and have a controller embedded in the view? It doesn't work.
My router ...
0
votes
1answer
20 views
Make multiple requests from array of objects and extend data with Angular
Let's say I have an array of books that I GET from an endpoint like /api/books.
[{
name: 'Book 1',
id: 1
}, {
name: 'Book 2',
id: 2
}, {
name: 'Book 3',
id: 3
}]
I have a BookService ...
0
votes
2answers
994 views
Why don't comment upvotes work? thinkster.io, angularjs tutorial, mean, incrementUpvote()
I'm following the thinkster angular js tutorial here:
https://thinkster.io/angulartutorial/mean-stack-tutorial/
and clicking on the upvotes icon next to a comment fails to increment the upvote count....
0
votes
1answer
22 views
Angular detect leaving a route.
I'm using Angular 1.5 and ui-router. I want to detect when a user leaves a route. I've currently got something like:
$scope.$on("$stateChangeSuccess", function () {
if (!$scope.flag) {
...
2
votes
2answers
49 views
Can't route properly Angular
Trying make REST API for TodoApp written Angular, set routes for ADD, UPDATE, GET ALL, but stuck on DELETE method.
My angular controller:
angular.module('todoListApp')
.controller('todoCtrl', ...
3
votes
2answers
2k views
render 404 page without redirecting in angular js
I am using ui.router & ngResource with AngularJS, & my question is :
How do I RENDER 404 without redirecting to it e.g A user typed http://www.example.com/wrong-page-name , he should just be ...
0
votes
0answers
7 views
$locationChangeStart determine if change came from URL Change or from Controller
Hi I am trying to determine if a querystring change came from a user changing to address bar in the URL or if query string was changed by controller.
The reason is, I am working with reloadOnSearch = ...
1
vote
0answers
16 views
Running ui.router in modal and ui-view
So not certain if this is possible with ui.router, but thought I would add a nice little modal that launches and says welcome to the site, give the user a chance to enter some details and so forth.
...
-2
votes
1answer
32 views
Angular ui router state gets confused (closed)
I have 2 state :
$stateProvider
.state('page-0', {
url: '/',
templateUrl: 'modules/page-0/page-zero.html',
controller:'page0Controller'
})
.state('page-1', {
...
0
votes
1answer
5 views
When transitioning IU Router states with Google maps on uiGmapIsReady picks up previous map not the new one
I am using UI Router and UI Google Maps.
According to the documentation I should use uiGmapIsReady to know whether the maps are ready to use on the page. This works great in isolation. But when ...
0
votes
0answers
20 views
Add controller to angularjs blur-admin registration
How can I add some logic to https://github.com/majkelo/blur-admin/blob/master/src/reg.html? (I'm not sure how to add controller to this view.)
Moreover should I move it to separate module? If so - ...
1
vote
2answers
101 views
Ionic button ng-click
I do have a different button on my first page.I just want to move to respective page on clicking to each button.However this is not working.I am new to ionic. Plz help.
Here is my controller.js
`...
0
votes
2answers
20 views
angular nested views not working
I want to build an email client application where user would see a login panel first and then will be redirected to main view with few other views inside. Like received emails, removed, spam ect. To ...
0
votes
1answer
11 views
angularjs named ui-views updating just one ui-view
I'm using AngularJS 1.5.8 and the ui-router and I have a menu on the left and a content area on the right.
I want the ability to navigate through the menu system without updating the 'content' ui-...
0
votes
0answers
23 views
AngularJS ui-router: Can it tell me if it failed to load a view?
I've been working on some code to implement loading views based on language selection.
I'm using angular-translate with the angular-translate-loader-static-files extension. This allows the app to ...
0
votes
2answers
34 views
UI-Router doesn't get previous state on $stateChangeSuccess
I need to prevent users from going to certain states (dashboard and account) on the app if they have not completed all required enrollment steps. If a user tries to access those states by direct URL ...
0
votes
1answer
16 views
AngularJs ui router can't go back when in a valid state
I'm having trouble when using a directive to go back when using navigation with ui.router. As far as I know, this problem occurs because of the way the application is structured. To identify a invalid ...
0
votes
1answer
20 views
default state in nested ui-view in ui-router
I am working on a project where I have a created a directive for a multi step form. Essentially trying to replicate this. The project layout has a header,navigation, a content page (which includes a ...
1
vote
0answers
21 views
passing variable ui-router
I have a page that has 3 sections. I'm using ui-router, and I'm using a abstract view to get the vehicle object
.state 'dashboard.home.vehicle_wizard',
url: "vehicle"
templateUrl: '...
1
vote
1answer
14 views
How to set 'reload:true' state with ui-router $stateProvider.state definition?
I can reload my states using :
<a ui-sref="state" ui-sref-opts="{reload: true, notify: true}">link</a>
but i wonder how to do this in my state definition, when i try to go from /state/...
0
votes
0answers
13 views
Angular UI-Router: Open child state in parent view
I currently have the following problem:
I am creating an Ionic/Angular/Phonegap application, using UI-router, which is great, only one thing is still unclear to me:
I have a tabbed application like ...
0
votes
1answer
25 views
How to define two mode (night/day) for AngularJS Application
I am working on an application using Angularjs. I am struck with one issues Animations.
I want to add to my application the way that make here be displayed in two mode (night and day mode). i saw that ...
1
vote
2answers
18 views
Load two templates in a root route in angularjs using ui-router
Please can someone help me with this problem.
.state('home',{
url:'home',
controller: 'mainCtrl',
templateUrl: 'index.html'
})
.state('home.profile',{
url:...
0
votes
3answers
33 views
angularjs & ui-router - Why home's controller isn't working?
folks.
As the snippet shows, home's controller isn't working. I think it should work, but maybe I'm missing something.
I'm thinking that controller definition is in the wrong place, but that's the ...
0
votes
0answers
17 views
Adding a 'back' class to allow different animation
I am using ui-router, ng-animate and have created a directive that adds a CSS class to the view container if the state is loading a parent state (i.e going back up through the state hierarchy). The ...
0
votes
1answer
17 views
Create new page in angularjs blur-admin
According to the tutorial I've added new page and module, but it doesn't seem to work (neither it's shown in a sidebar, nor I can get it via direct url). What am I missing?
2
votes
2answers
103 views
AngularJS UI-Router conundrum - can't switch to login screen
I am trying to prevent the user from going straight to bookmarked URL when not logged in (maybe I should figure out how to only display one URL, no matter what the state ?).
If the user has logged ...
1
vote
2answers
18 views
ui-sref not adding href to html rendered and there by not clickable
No errors in console.
My code is simple and as below
Home.html
<h2>Select the car for seeing details</h2>
<div ui-view=""></div>
angular.module('...
12
votes
1answer
230 views
Is it possible to pass param from state to state with angularJs?
I wish to pass a param from one store-state to the display product info in products-state:
My app - storeApp
.config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('store', {...
0
votes
1answer
27 views
How to configure Angular 2 router to run from /src subfolder
Basically I'm trying to make two distinct subfolders in my project, src and dist. Here are the important bits in my app:
root folder: C:\Server\htdocs\
app folder: C:\Server\htdocs\src
index.html ...
0
votes
1answer
23 views
Is it possible to let submodules in AngularJS control their own routing using ui-router?
Here's the scenario:
I have a main AngularJS app that uses ui-router for routing, like any other app. I also have a smaller AngularJS module that functions as its own app, not requiring that it be a ...
-1
votes
0answers
21 views
How to catch dynamic url using ui-router?
How to catch this url in ui-router ?
/cat-{catid}-buy-
{subcategoryname1}-sub-{subcat_id1}+
{subcategoryname2}-sub-{subcat_id2}+
{subcategoryname3}-sub-{subcat_id3}+ ....(up to n sub category.)
is ...
0
votes
1answer
21 views
How to use and map alias string instead of id in UI-Router
Usually I use ui-router state with id parameter like this:
/* route /news/{news_id} */
http://servername/#/news/14
but already I want to use alias string instead of id like this:
/* route /news/...
0
votes
1answer
19 views
Angularjs UI router submodules and URLs
I have an app where a module looks at the URL. If the URL has anything past the "Document" section then one state is set using the information beyond that URL. If the URL has nothing beyond that point,...
10
votes
3answers
14k views
jQuery scrollTop() returns 0 for all elements
At my job we have a one page site I created with AngularJS.
We're using the ui-router plugin (version 0.2.0).
Recently I've noticed that when moving from one state to another, the window isn't ...
0
votes
1answer
16 views
Electron angularjs ui-router not loading ui-view on mac
I have an app in Electron that works perfectly on windows, but when trying to run on mac, it wont load the first ui-view. Maybe this is a path issue cross os?
No errors on state change, console, or ...
4
votes
2answers
4k views
How can i update $stateParams without reloading the ui-view? angular ui router
Get the context, angular, ui-router, nothing special, a root view built with 3 named ui-views.
so in index.html we have
<body>
<div ui-view='left'>
<div ui-view='center'>
<...
0
votes
3answers
40 views
Angularjs read $scope in only root state
I'm using ionic and angularjs.
My app.
.state('auth', {
url: '/auth',
abstract:true,
templateUrl: 'templates/auth.html',
controller: 'authCtrl'
})
.state('auth.reg', {
url: '/reg',
...
3
votes
1answer
61 views
Accessing Route data in root component, route data is empty
My problem is that I have a lang.component loaded with <router-outlet>. What I need is to access ActivatedRoute params in the root component which is app.component but all route data there is ...
0
votes
1answer
28 views
Resolve using UI Router and pass to a component's controller
How do I resolve a variable with UI Router when I am using a component.
This is the route:
$stateProvider
.state('route', {
url: '/route',
template: '<my-component user="user"></...
1
vote
2answers
32 views
Angular ui-router render different component based on route params
Using Angular UI Router, I'm trying to render a different component based on a $state.params value, but I can't find a clean way to do this.
I figured out a working solution already (with some ES2015 ...
0
votes
1answer
29 views
implement back button functionality using $state
My application has multiple states.
The workflow is such that from the landing page I go into Alert view page that has list of alerts in a tabular format. From that list I select an alert which ...
0
votes
2answers
39 views
$stateParams is not passing params in $scope.$on method
I'm trying to fit routing in existing application. It requires too much changes to fit router in perfect manner so I'm trying to manage it using $broadcast and onEnter of ui-router.
I'm changing URL ...
-1
votes
1answer
33 views
Resolve not working in Angular ui-router
I am trying to use a resolve to front-load data from Rates Service in my Controller (rates controller) and get a blank screen. The api works but for some reason when I go step by step, in the ...
0
votes
0answers
19 views
Angular child state not loading correct template or controller
I'm trying to create a child state of transactions called 'clean'. I've tried every which way of creating a child state, including using the parent object (noted in the code block below). When I make '...