Tagged Questions
0
votes
1answer
21 views
“ui-sref” does not refresh the “ui-view”(its controller does not rerun) when a link is clicked twice
When a state is clicked at first, the div that owns the "ui-view" attribute is replaced with the "template" of that state. However, when I click the same state again, its controller does not reloaded. ...
0
votes
0answers
14 views
Organize long list of routes [on hold]
I am using angular-ui-router https://github.com/angular-ui/ui-router for route management now. However, my $stateProvider is very long with 50 - 100 routes:
$stateProvider
.state('state1', {
...
0
votes
0answers
8 views
Complex URL states containing parameters with a dynamic template in angular/ui-router
I'm trying to set up a complex URL structure:
http://example.com/quote/:param1/:param2/:param3/:param4
Each state uses the same template except for 1.
My question being, is there a way to ...
0
votes
2answers
16 views
Phonegap Android Back Button w/ Ionic and Angular
I'm having issues disabling the back button for Android in a Phonegap project using Ionic Framework / Angular JS. I have tried many other proposed solutions to no avail. The problem is I have a ...
0
votes
1answer
12 views
Does an ng-click trigger a $stateChangeStart?
I'm using Angular UI Router and I have a very simple:
<a href='#' ng-click="toggleCollapse()">
<i class="icon icon-triangle-down" ng-class="{'icon-triangle-down': !isCollapsed,
...
-1
votes
1answer
26 views
difference between $state.go() and $state.transitionTo() [duplicate]
In angularjs if we want to change the state, $state.go() and $state.transitionTo() these two things are referred by many people even in tutorial. But what is my doubt is some say $state.go() is good ...
0
votes
1answer
13 views
Angular UI Router - Parentless Child States
I think that my objective won't work with AngularUI Router - but I'm going to put it out here in case someone can prove me wrong or has an alternative solution or a workaround that solves the same ...
0
votes
1answer
16 views
params with array values get separated by commas when transitioning to a state
I have just started using angular Ui router and I was trying navigate to another state with some parameters.
Let's say following is my parameters object:
{
a:[1,2,3,4],
b:["1","2","3","4"]
}
...
0
votes
1answer
20 views
If $state.name('something') using ui-router
Is it possible to check the state name and if it matches then do something?
Kind of like this:
.run(function ($rootScope, $state, $location, Auth) {
$rootScope.$on('$stateChangeStart', function ...
0
votes
1answer
15 views
Error: $injector:modulerr Module Error with ui-router
i cant figure out what is the problem
div#wrapper(ng-app="adminApp")
....
js/
var adminApp = angular.module('adminApp', ['ui-router']);
if i use
var adminApp = angular.module('adminApp', []);
...
0
votes
1answer
23 views
using node passport.js for multiple websites
I am writing a node.js server to act as a REST server proxy for another server. Basically, it is going to allow multiple websites to authenticate, and provide a REST api for them to use.
I am going ...
0
votes
0answers
7 views
Extending ui-router $stateProvider
I am trying to extend the $stateProvider from ui-router in different parts of an Angular app. I figured that creating the main app then adding modules to it should work - but it does not.
On load I ...
0
votes
2answers
20 views
Change the url with Angular UI-Router, do nothing else
There doesn't appear to be a built-in way to update the url without running all of the other processes, e.g. invoking controllers.
The option "reload", only works with $location.search()
Is there a ...
0
votes
2answers
25 views
What is the equivalent of the emberJS routing beforeModel function just for angularJS
With emberJS I can intercept a state/route activation process with:
http://emberjs.com/guides/routing/redirection/#toc_before-the-model-is-known
overriding the beforeModel function.
What is the ...
0
votes
0answers
22 views
AngularJS Prevent $watch from firing when syncing data model with URL
I'm trying to keep a data model in sync with the url:
When my url updates, and $stateParams changes, selectedNode is found
$scope.$watch('$stateParams', function (params) {
// some logic
...
0
votes
0answers
14 views
Is it possible to transition between named views with ui-sref in the same template file?
Here's my code
// DEMO
.state('demo', {
abstract: true,
url: '/demo',
templateUrl: 'views/templates/demo.html',
controller: 'MainCtrl'
})
// PAGE ONE
.state('demo.one', ...
0
votes
1answer
18 views
Can a filtered ng-repeat become a ui-router state in AngularJS?
I'm using ng-repeat to list photos and to filter them by genre:
<div class="partial-view" ui-view>
<div class="portfolio" ng-controller="PortfolioCtrl">
<ul ...
0
votes
1answer
32 views
AngularJS UI Router shared nested routes/states
I'm looking to share a child state between multiple states.
For example I have a shopping site.
Lets say I have the following
.com/random
.com/browse
.com/browse/product/:productID
...
0
votes
1answer
27 views
Failed to load resource: the server responded with a status of 404 (Not Found) angular js + ionic
This is the error im having from Google Devt Tools. Anyone knows the problem? I tried to change in many times including the file structure and the stateProvider (no controllers for that) in app.js ...
0
votes
1answer
22 views
How to delay execution of a controller (angularjs) till an external JS file loads?
I'm working on a Youtube API based project in which I've already bootstrapped angular.
I'm encountering a problem when I need to call an external JS to load the iFrame API js file first and then allow ...
1
vote
1answer
54 views
What should be my approach for angularjs nested ajax calls [loop within a loop]?
| | | | A1 | | | |
| AJAX 1 | --> | Response1 | --> | AJAX 2 | --> | Response2 (Final) |
| | | [ARRAY]-A1 | | A1 ...
0
votes
0answers
23 views
Can one load in specific ui-router states depending on what CSS media query is active?
I am creating a responsive web app using Angular and ui-router. I need different states to be loaded depending on what size a user's browser window is via CSS media queries.
e.g. For the main page ...
0
votes
1answer
32 views
I can't get datas from json file with angula.js
I have theses codes:
index.html:
<!DOCTYPE html>
<html lang="en" ng-app="pizzasApp">
<head>
<meta name="viewport" content="width=device-width, ...
0
votes
1answer
11 views
Save data and scroll of previous state when opening new state in modal window (Instagram/Pinterest routing)
I want to create routing like on the Instagram/Pinterest. In my case - open full article in the modal window. From FAQ
I find this code:
$stateProvider.state("items.add", {
url: "/add",
...
1
vote
1answer
26 views
Are there any Typescript definitions for the AngularJS ui-router?
I am using typescript with ui-router. Has anyone found any Typescript definitions for this. I looked on definately typed and could see nothing. Here is what I would like to find an interface file ...
0
votes
1answer
31 views
Set an element's attribute text/value through an angular directive?
How do I set the text of an attr?
Trying to set the values of meta tags description through it's content attr.
<title update-title></title>
<meta name="description" ...
1
vote
2answers
34 views
Angular ui-router fails to load let alone resolve factory dependencies [SOLVED]
Empty strings in the factory definition was the issue. Though the framework should define an error for this case as it'll help new comers. Thanks Sylwester & Marplesoft for answers.
UI router ...
1
vote
2answers
31 views
html partial is not loaded into ui-view
I have posted a sample on plunker:
http://plnkr.co/edit/aOOlXOUIUQTARb8D7jNR?p=preview
I get no errors in my browser console.
I want that when I switch the day/week/month views by pressing the ...
0
votes
1answer
25 views
Putting a “resolve” on an angular-ui-router view isn't working - the page simply doesn't render
$stateProvider
.state('root', {
url: '',
views: {
'root.base': { templateUrl: '/templates/root/root.html' },
'root.sidebar': {
templateUrl: '/templates/root/root-sidebar.html',
...
1
vote
2answers
27 views
Why does AngularJS with ui-router keep firing the $stateChangeStart event?
I'm trying to block all ui-router state changes until I've authenticated the user:
$rootScope.$on('$stateChangeStart', function (event, next, toParams) {
if (!authenticated) {
...
0
votes
1answer
29 views
Angular ui-router ui-sref redirects back to calling page, even though destination page renders correctly
I'm a newb and have to be doing something stupid here, and I can't figure it out for the life of me. Thanks in advance for any help!
In short, I have 3 pages that all load correctly when visiting ...
0
votes
1answer
11 views
params not working in $stateProvider in angular ui
For the following code sample, the params does not seem to take affect. but if I put the param as part of url then it works fine. Both are supposed to be equivalent. However putting in params ...
-1
votes
1answer
27 views
AngularJS UI-Router URL not loading and switching to /
I'm following the UI-Router Nested States & Nested Views : Abstract State code example from https://github.com/angular-ui/ui-router/wiki/Nested-States-%26-Nested-Views#abstract-states and adapting ...
0
votes
2answers
28 views
How to access resolved date within root scope
In my app I have states that fetch various resources from server using resolve clause.
I also have a global controller that need access to these resources. For example, consider a breadcrumb that ...
1
vote
0answers
29 views
Angular ui-router to accomplish a conditional view
I am asking a similar question to this question: UI Router conditional ui views?, but my situation is a little more complex and I cannot seem to get the provided answer to work.
Basically, I have a ...
0
votes
1answer
22 views
Angular ui-router, how to get state associated with controller?
Plunkr demonstrating problem:
http://plnkr.co/edit/Czc5kGpCwsruUQe2EanZ?p=preview
With the states:
.state('state1', {
url: '/state1',
template: '<div>state1 <pre>{{current | json ...
0
votes
1answer
53 views
Overriding named view templates while using angular-ui-router
Inside the root.app.work state or /work url, how do I change it's page template to <div>wtf</div>.
UPDATE: I cant get root.app.work.show to properly route? it goes to 404
//routes.js
...
1
vote
1answer
42 views
AngularJS ui-router : Could not resolve___ from state ___ Error
I am following along on this year old ui-router tutorial http://txt.fliglio.com/2013/05/angularjs-state-management-with-ui-router/ and I'm getting the following error:
Error: Could not resolve ...
0
votes
2answers
46 views
Angular UI-Router get the current state from within a view
Considering the following states taken from the ui-router documentation:
.state('state1', {
url: '/state1',
templateUrl: 'partials/state1.html'
controller: 'State1Ctrl'
})
.state('state1.list', ...
0
votes
0answers
13 views
AngularJS ui-router- Use filters in ui-sref with parameters?
Suppose if we have to modify or do some prepossessing on parameters of ui-sref like below:
ui-sref="post({postId: post.post_id, postTitle: post.post_title | myFilter )})"
As shown if I want to ...
0
votes
1answer
35 views
Angularjs-ui-router:resolve in parent does not fire from children
In my angularjs app ,i have angular-ui-bootstrap tabs and on selection of tabs i change to different state using $state.go and with state transistion url on browser changes.
I have parent static tab ...
-1
votes
1answer
35 views
How can I fix 'Maximum call stack size exceeded' AngularJS
I am using AngularJs and Ui-Router and I am trying to set two different home pages, one for users that are logged in and the other for users that aren't. But I am getting the following error:
...
0
votes
1answer
42 views
I am using MEAN.IO stack, why can't I hit my data-access layer using require?
So, I am using mean.io and for some reason, my routes.js never hits my 'index.all' method, or the 'exports.all' function, even though I require the functions from the server-side controller. Also, my ...
-1
votes
0answers
14 views
Use URLEncoded URL parameters in angular-ui router
When using $state.go(to, params, options) in angular-ui router, I would like to be able to have the params parameter saved in URLencoeded format so my URL can be bookmarked, and traversable through ...
0
votes
0answers
22 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 ...
0
votes
2answers
22 views
many controller for state in ui-router
how to add many controller for state in ui-router ?
I have searched long and hard but found nothing that helped yet. Where I wrong? I really do not know what to do. I wrote all the details below. ...
0
votes
1answer
15 views
Prevent repaint of absolute/relative named views using ui-router
I have a site where there are three separate areas of content:
content
sidebar
lightbox
I want to load a different piece of content into each area depending on the url e.g.
/content/1/
...
0
votes
0answers
19 views
set route url when clicking on a button with ui-sref
This is my plunker: http://plnkr.co/edit/0DJ6W7QEPx2UzpdzDrVu?p=preview
steps to reproduce the wrong behavior:
1.) Click on a project item and then the open button.
2.) Now you see the date planner ...
0
votes
1answer
16 views
How to re-render a directive template and link function?
I am creating a navigation "tree" that basically allows you to navigate to parent views like so
Home > Planner > Contacts > [email protected]
This list is just a normal <ul> that ...
1
vote
2answers
46 views
AngularJS - Passing data to remote controller from ui-router state & url
SOLVED: See below
I have the following illustration with actual PLUNKER CODER HERE
I have been successful in dynamically changing the left menu to 1 of 2 possibilities and well as the respective ...