Tagged Questions
0
votes
0answers
5 views
Angular route resolve not waiting for promise
I'm new to angular and I have a user route which I'm attempted to resolve the user object for before rendering the view. I've injected $q and deferred the promise, however, the view is still loading ...
0
votes
2answers
48 views
What is the AngularJS way to do a client-side include, with route parameters?
Let's say that I have 2 pages in my AngularJS app, one which displays information about an author, and another that displays info about a book. I have a separate template file, controller, and route ...
2
votes
2answers
44 views
Angular Js - Changing views not working
I'm trying to change view from the controller but it isn't working.
app.js
var app = angular.module('vla', ['ngRoute']);
app.config(function ($routeProvider){
$routeProvider
...
0
votes
3answers
37 views
Angularjs maintain user state and partial templates
I am new to angularjs and setting up a basic web app where a user can login to search and update news articles which are posted from a different website.
I have got two questions:
1. User's login ...
1
vote
1answer
47 views
What is the best way to have different headers and footers in angularjs?
I am using angular js single page app. I have header and footer in common and my ng-view changes according to the routing. Now I need to have a page with different header and footer. How can i modify ...
0
votes
1answer
14 views
Run function on every route change
I have an app built on angular.js, and I want to run a function whenever the route is changed and a new template is rendered in the view. I found a way to do it in a controller when it is activated, ...
0
votes
1answer
45 views
load data from service before controllers
Hi I'm want to load data from a factory before any of my controllers are loaded. I found a way to do it using resolve:
angular.module('agent', ['ngRoute','ui.bootstrap','general_module', ...
0
votes
1answer
20 views
Expressjs res.render not rendering values in angularjs partials
I am redirecting to next page after login on expressjs after login, I have some partials to be loaded from angularjs routers which is all fine and working. In res.render I have some data set like ...
0
votes
1answer
43 views
angularjs not loading partials
I'm trying to put together a basic angularjs web page through django (but not really using django for this example). I tried to copy an example exactly, but it's not working. The partial and the ...
8
votes
5answers
274 views
How do I replace my angular location without a controller refresh?
Suppose I have an Angular app for editing eCards. Creating a new eCard uses a path like #/ecard/create and editing an existing eCard uses a path like #/ecard/:id. A tabbing system lets us have ...
0
votes
1answer
54 views
Angularjs Express.Js redirect Issue with angular Ajax call
I have a $http pst ajax call from angular js to Express.js api. In Express.js part I ma using async module of node to have some serial execution of code. When no issues I want to redirect to a ...
1
vote
2answers
36 views
Angular change url without executing routeprovider
I'm trying to make facebook-like modal windows - for example you click on image and it opens in modal window and the url changes from / to /img/dj27s_D without rerendering the views and when you close ...
0
votes
3answers
29 views
Keeping track of whether a user has edited a form
I am loading a form with customer data in it. When a user edits the customer data, I want to be able to track the changes so that if a user changes url, I can pop up an alert to ask the user whether ...
0
votes
0answers
16 views
Equivalent of Backbone.history.loadUrl() in AngularJS?
I'd like to trigger an Angular route without changing the URL in the address bar. It's absolutely possible to do this with Backbone as explained here, using Backbone.history.loadUrl() -- I've tested ...
0
votes
2answers
34 views
Trigger route without updating URL in AngularJS?
I'm wondering if it's possible to trigger a route and show a different view in Angular without updating the URL.
Basically I am embedding an Angular app inside an existing web site, and I don't want ...
0
votes
2answers
31 views
AngularJS otherwise function redirects me to wrong route
I have routes difened like this:
$routeProvider
.when('/settings', { templateUrl: 'settingsTemplateURL', controller: settingsCtrl })
.when('/profile', { templateUrl: 'profileTemplateURL', ...
0
votes
0answers
32 views
AngularJS: How to prevent route change from happening
I'm listening to the event $routeChangeStart and I want to be able to redirect the user to another controller based on a condition. I am able to visually redirect him to another controller with ...
0
votes
1answer
51 views
Angular best practice (in this situation) for passing data between controllers - service or routeParams?
I'm fairly new to AngularJS and I realise this question has been asked before (so hopefully I wont get voted down) but I've been unable to find a question matching my situation.
I want to pass search ...
0
votes
1answer
46 views
Yeoman Angular not working with ngRoutes
I just created a new Yeoman angular project. The basic site worked when I started grunt serve. I tried to modify the project to use ngRoute so I could add more views, but I can't get any of the views ...
0
votes
1answer
185 views
Error Uncaught Error: [$injector:modulerr] angularjs
I am using angularjs routing, but getting below error...
<title>Angular js</title>
</head>
<body><div data-ng-controller="SimpleController">
...
0
votes
1answer
33 views
Error in component $injector
I am loading my views in my app.js:
// create the module and name it testApp
var testApp = angular.module('testApp', ['ngRoute']);
// configure our routes
testApp.config(function($routeProvider) {
...
0
votes
0answers
38 views
Using Google Chrome back button only ng-view content is loaded
There is a problem when navigating back:
Only a portion of the previous page is rendered and that is the portion loaded from "templateUrl" and rendered in ng-view.
I am using manual bootstrap :
...
0
votes
1answer
33 views
Angular routing for POST URLs
The tutorial on Angular's website for Routing and Multiple Views shows an example where one partial page has snippets like:
<a href="#/phones/{{phone.id}}">{{phone.name}}</a>
It means, ...
1
vote
0answers
38 views
AngularJS $routeProvider can't specify groups of optional parameters
I have an angular view that displays a list and an optional detail of an item with a compound primary key (because the list aggregates results from multiple databases).
When an item from the list is ...
0
votes
1answer
45 views
Changing routes doesn't refresh data, gives ng:areq error
In my AngularJS app, I have a route that looks like:
.when('/:project/:page', {
templateUrl: '/ui-editor/editor',
controller: 'EditorCtrl'
})
In a view, I have a link that looks like:
...
0
votes
1answer
91 views
AnguarJS + node.js (web-server.js) remove hashtag from url and support it by server side
As far as i understand in order to remove the hashtag from angularJS i need to add the following code:
config(function($locationProvider) {
$locationProvider.html5Mode(true);
}).
after added ...
2
votes
2answers
178 views
AngularJS: taking full advantage of AngularJS features/structures
I am working on a web app with AngularJS which I just started learning a while back. I find it extremely useful but after working on it for few days, I figured that the app is going to get all messed ...
0
votes
0answers
56 views
After changing the angularjs in my application I am getting error
I developed an application which uses 1.0.1 version : https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js
Now I need to use latest version as to use new functionality so I tried ...
0
votes
0answers
70 views
Can't get an AngularJS template to display
I am trying to walk through an Angular tutorial and having trouble with some basics.
I have the following directory structure:
index.html
angular.min.js
angular-route.js
app
views
...
4
votes
2answers
297 views
angular MINERR_ASSET not found 404
I'm getting an error logged to the console:
GET http://localhost:3000/js/lib/angular/MINERR_ASSET 404 (Not Found)
I saw this post and it said it was a result of not inculding ngRoute module, ...
1
vote
5answers
58 views
What is the difference between an ng-controller directive and a controller in the route?
I worked through the tutorial on the AngularJS website and I noticed that in one step, they change how a controller is introduced into the application. Initially, they use a directive:
<body ...
0
votes
1answer
35 views
Using routeProvider when not on site root
Sorry if I'm missing something obvious, very new to Angular.
I'm running an application on this page: //hosted.demo.ca/md/SitePages/Home.aspx
I'm trying to set up the routing on the application but ...
1
vote
1answer
69 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
2answers
298 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:
...
2
votes
2answers
277 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 ...
16
votes
3answers
2k 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
0answers
177 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 ...
2
votes
4answers
980 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 ...
0
votes
2answers
107 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
262 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 ...
1
vote
1answer
57 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, ...
4
votes
2answers
195 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 ...
-1
votes
1answer
47 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
91 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
0answers
121 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 ...
3
votes
1answer
366 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
381 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.
...
1
vote
0answers
264 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
533 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
293 views
routing bug in an angularjs app with jQuery
I'm trying to get set up an angularJS app with jQuery and I'm using the angular routing system for urls doing something like the following:
var app = angular.module('app', []);
...