Tagged Questions
0
votes
1answer
21 views
angular-ui-router why the release dir is empty?
If I run
bower install angular-ui-router --save
the release dir (and there is no file named angular-ui-router.js in other dirs) is empty so I can't include
the module in my script :(
Do anyone ...
1
vote
1answer
41 views
Creating a controller to each view in angularjs
I'm beginner in AngularJS and I want to create a controller to each view, but this file only can be referenced when I load the view, so:
my app.js:
var app = angular.module('app',['ngRoute']);
...
0
votes
0answers
63 views
Angularjs: using $routeProvider and ng-controller at the same time
I use $routeProvider for 90%+ of my controllers, but am using ng-controller to attach controllers to angular-ui bootstrap html popover templates.
It works, but every controller I specify with ...
0
votes
0answers
54 views
CakePHP and AngularJS Partials Routing Issue
I am using CakePHP and AngularJS. I am currently having an issue where my AngularJS routes are not loading my partials. Does anyone have any ideas of where to look? Here is my routes code:
...
0
votes
1answer
25 views
Changing route doesn't scroll to top in the new page
I've found some undesired, at least for me, behaviour when the route changes.
In the step 11 of the tutorial http://angular.github.io/angular-phonecat/step-11/app/#/phones
you can see the list of ...
0
votes
3answers
30 views
Unable to change the location after calling controller function
I have read and tried applying all of the approaches I can find on SO but none of them work.
I just basically want to load a different view once the user logs in:
myApp.controller('LoginCtrl', ...
-1
votes
1answer
39 views
AngularJS $location object doesn't have the path() function
For some reason my $location object doesn't have the path function when calling in my controller.
Someone an idea?
E: here the Controller
erpmApp.controller('dashboardCtrl', ['$scope', '$http', ...
0
votes
2answers
40 views
angularjs ui.routes modules html5mode works or not?
I've googled a little bit but I
found very little information if
ui.routes works or not with
html5mode=true and $locationProvider.hashPrefix('!');
I mean if you use ui-router you can make your site
...
3
votes
3answers
110 views
Difference between angular-route and angular-ui-router
I am new in angular. I find angular quite interesting and planing to use angular in my big apps. So I am in the process to find out right module.
What is the difference between ngRoute ...
0
votes
1answer
23 views
Angular.js not reconizing routeurl
I worte an angular module with ng route that's looking like this (erpm.js)
'use strict';
var erpmApp = angular.module('erpm', ['ngRoute'])
.config(['$routeProvider', ...
0
votes
1answer
58 views
Routing is not working in MVC Web API and AngularJS
I am using MVC Web API and Angular JS
When i am giving single routeProvider, then its working after adding one more routeProvider its not working....
My Code Is:
var phoneModelsApp = ...
0
votes
1answer
67 views
Angularjs routing, nothing happens
I'm trying to implement routing into a empty Angular project but the routing doesn't seem to react to the different urls.
index.html, index.html#/, index.html#/audience just seems to load the index ...
0
votes
0answers
33 views
clear all pending $http requests and reload page in angularjs
i tried $route.reload(); location.reload(true); $window.location.reload(true);but pending requests are not cancelling/aborting, page is reloading, how to hard reload page means closing all $http ...
0
votes
1answer
80 views
Rename url id to readable format in angularjs
I storing each post in firebase with firebase auto generate id. let say this -JBuEJXgILubWjxECjwj
then I query the post like this
Post.getPost($routeParams.postID); //snippet code
so when user ...
-1
votes
0answers
22 views
ngOptions not updating the dropdown when used inside ngView
I have a select control with ng-options inside one of my html template (ng-view). I am trying to programmatically change the drop-down list by updating the scope property that contains the ...
0
votes
2answers
26 views
Display specific template on $routeChangeError
I have a feeling there is no way to do this, but I figured it couldn't hurt to ask. I'm using route.resolve to check the current user status when routes change and determine if they are authorized for ...
0
votes
0answers
27 views
AngularJS and php routing in IE9 doesn't work
I have an application with routing on php. Here is the simple example:
$req=$_SERVER['REQUEST_URI'];
if(strpos($req, '/items/') === 0){
include __DIR__.'/../views/items/index.php';
} else{
...
-1
votes
0answers
42 views
Why are the Angularjs Routing examples not working, for me in angularjs 1.2.x?
I was asked to create a second page on my angularjs application,
I needed to have one paths for each.
http://localhost:8080/myapp/
http://localhost:8080/myapp/dashboard
...
2
votes
4answers
121 views
How do I parse URL params after a hash with Angularjs?
I'm trying to parse for the access_token from Foursquare where the URL is like this:
https://mywebsite.com/4sqredirect/#access_token=1234567890XXXXX
I've tried $routeParams and $location and get ...
-1
votes
2answers
47 views
AngularJS returned 404 error if I typed the URL
I have an angularjs application hosted in my local IIS with route configured. For example '/services' will use servicesController and services.partial.html view.
It worked well if I clicked the link ...
0
votes
1answer
50 views
Preload AngularJS partials used in routes?
Question: What is the best way and the best time to pre-load .ng files that are used in routing templates?
In researching this thus far, I've found the following answers:
Use Angular's script ...
0
votes
2answers
53 views
Flexible routing and 'passing through' certain URLs?
I have a Django web application serving an Angular JS client application.
My URL tree looks like this:
> /
> /admin/
> /login/
> /logout/
> /static/
> ...
0
votes
1answer
60 views
AngularJS Dynamic Routes Without Hashtag
I am building an application using Angular and not sure how to handle dynamically created urls that do not contain the #. I have tried the html5Mode true but that doesn't work because the server is ...
0
votes
1answer
40 views
angular.js redirect crashing browser
I'm trying to do a simple TODO sample with angular.js (using routes).
I could open the form to create a New Task, but when I click on "Back" button (after create a new one), it always crashes my ...
0
votes
1answer
41 views
AngularJS redirect flashes previous template
This question has been asked a couple of times with no correct answer so hopefully this question/answer will resolve many peoples' issues.
Basically I have a resolve object attached to my routes, ...
2
votes
0answers
65 views
angularjs $routeProvider route is executed before resolve completes
I would like the route.resolve method(s) to fire before the actual route code is run. Unfortunately in the code below, prime() gets called but it is called asynchronously and the route code gets ...
0
votes
1answer
56 views
AngularJS $routeProvider does not have reload method
The AngularJS documentation indicates that the ngRoute $routeProvider has a reload method.
reload()
Causes $route service to reload the current route even if $location
hasn't changed.
As ...
-1
votes
1answer
201 views
Using resolve in $routeProvider causes 'Unknown provider …'(Solved)
SEE SOLUTION AT THE BOTTOM OF THIS POST
So I am trying to do an asynchronous http request to load some data before my app loads and so I am using a resolve in $routeProvider which is an http request ...
5
votes
1answer
142 views
AngularJS - use routeProvider “when” variables to construct templateUrl name?
So this is what I am trying to accomplish:
'use strict';
var app = angular.module('myModule', ['ngRoute']);
app.config(function($routeProvider) {
$routeProvider
.when('/', {
redirectTo: ...
0
votes
1answer
53 views
Back Arrow and Angular Routing - Press Back Twice
Angularv1.1.5
Site: http://tilsa.azurewebsites.net
I have a very simple route setup however when the user goes from the default/home route to the detail (pregunta) route and then clicks the back ...
-1
votes
1answer
46 views
Switching between views on same controller
I've got a page that says "GENERATE", and it has a form on it. And then you submit the form by pressing the Generate button, and I want it to take you to a new view called "LOADING" whilst it waits ...
0
votes
1answer
45 views
Stop a common template from being reloaded
I have an Angular application that depends on Angular ui-router. This application has multiple pages which share a common template such as the navbar:
var app = angular.module('app', ['ngSanitize', ...
0
votes
1answer
96 views
AngularJs - Dynamic Routes with Crud in 1 Controller
I am able to successfully utilize dynamic routes. I would also like NOT to separate CRUD functionality in my different controllers (ie. keep CRUD in one controller per object).
Per this question, I ...
0
votes
0answers
61 views
Subviews in Angular
So I am trying to render a subview within a template but I want to define the state inside of the subviews controller on click of an element. The reason for splitting it out from the main controller ...
0
votes
0answers
46 views
Make sure some object is loaded from server before $locationChangeStart event handler gets executed
I have a handler bound to $location's $locationChangeStart event. Within that even handler, some user object coming from the server is required. Below is the code (simplified) that I have:
...
0
votes
3answers
169 views
AngularJs Routing without hashtag in link?
I've recently began learning AngularJs for web development and am loving it so far. However, I'm not so sure about having hashtags withing the link when routing between views. My main concern is how ...
1
vote
1answer
93 views
Set angular.js url root globally
I have an angular app that is hosted at my university server.
Because the app is not in domain root (urls are constructed as follows: university.domain/~<student_id>) all links and image srcs ...
1
vote
1answer
151 views
AngularJS $location.path(path) not updating at first
I have a piece of code where I call $location.path(name) and nothing seems to happens (at first). I can call console.log($location.path()) and it does show the new path -- but the view doesn't change.
...
0
votes
2answers
85 views
How to replace a part of sections in ng-view?
I'm leaning Angular's route. It's very clear how to load a view into ng-view by simply setting template attribute.
Let's say I have a widget on a view. When a user navigate to /#/changeWidget, how do ...
-1
votes
1answer
80 views
How to handle “complex” logic in route.resolve in AngularJS
Currently in some of my controllers I have a logic that e.g. redirects user to a different route if some conditions are met.
I'm trying to move some of this logic from controllers to route.resolve to ...
2
votes
1answer
73 views
How to change URL not not trigger $route changes?
I have a situation where I want the URL in the address bar to change, but I don't want Angular to refresh the controller or view like in a normal route change.
So, going to /data then clicking on a ...
2
votes
1answer
119 views
How to use native anchor links with angularjs
I'm using angularjs on a rather large flat documentation page. The page has some navigation thats designed to use traditional url hash links. The urls look like so:
...
1
vote
1answer
51 views
How to cleanly specify a resolve property for a route
I want to find a clean way to set resolve for a route.
From what I've seen there's 3 main ways of doing this:
declaring global functions (not good)
anonymous functions (bad if the logic is ...
0
votes
0answers
166 views
How do I execute foundation js call after images are loaded in AngularJS ngview?
I'm creating a web application with AngularJS and Foundation.
The problem arises when I use the Orbit content slider packed with Foundation. It requires a call to foundation's initializing function ...
0
votes
1answer
196 views
AngularJS Scroll to element prevent browser from jumping
I've written an app that has a list of blocks.
Each block contains links to other blocks.
When a link to a block is clicked e.g #/home/page-19, the page animates down/up depending on current ...
0
votes
1answer
172 views
AngularJS Scroll to ID using routeParams
I'm making a single page app, that has subpages.
The idea is, I have urls e.g home, about and contact.
Each page then has multiple blocks.
The blocks are set a minimum height, when page loads. The ...
0
votes
1answer
303 views
AngularJS and PhoneGap: $location.path causes subsequent tempateUrl lookup to fail
I'm having trouble getting path lookup to work with a AngularJS v1.2.0 and PhoneGap/Cordova Android application. I've come pretty far with html5mode(true) by setting <base href="."/> in ...
0
votes
1answer
64 views
routes in AngularJS and Angular versions
angular.module('appPTracker', ['ui.bootstrap',
'appPTracker.filters',
'appPTracker.services',
'appPTracker.directives',
'appPTracker.controllers',
'ngGrid']).
config(["$routeProvider", ...
1
vote
2answers
152 views
Add “intermediary” page prior to full page load Angular
My problem
I am using Angular to create a Phonegap application. Most of my pages are fairly small and the transition/responsiveness is quick and smooth. However I have one page that is fairly large ...
1
vote
2answers
791 views
Redirect from Angular JS not working for URL with hash '#'
Background of how I am initializing my AngularJS app is here :
SCRIPT5022: 10 $digest() iterations reached. Aborting! and redirecting to index.html
Summery Problem
When I do a window.location = ...