1
vote
1answer
16 views

AngularJS: Highly Dynamic Routing

Hi, I am currently looking to implement something like this (AngularJS): $routeProvider .when('/root/:controllerName/blah/:blahId/blah/:blah', { templateUrl: ...
0
votes
2answers
20 views

angularjs, use a function in the routing as the templateUrl

It's possible to use a function as the templateUrl. The official documentation for $routeProvider states: templateUrl – {string=|function()=} $routeProvider official documentation In ...
0
votes
1answer
38 views

Set radio button state based on a value received from REST in AngularJS

What I would like to achieve is set a radio button's state according to the data retrieved from the server in AngularJS. What makes this more special is that I need to show a div based on a condition ...
0
votes
1answer
67 views

angularJS template url is not loading automatically

It's loading when I type a char in input type="search". Page is calling 'ajax call' twice. request is fire twice on 'single click' or 'onPageload' index.Html This is my html file which has a ...
0
votes
1answer
34 views

Resolve in router is not updating scope in time

Hello there, I have issue with manipulating with scope variables (with resolve in router) before angular view content is renderer. I am using AngularJS 1.2.16 I have view, where is DIV displayed ...
0
votes
0answers
23 views

AngularJS remembering page scroll location

I have multiple pages of data that lists publications by author. The first page lists all the publications and has infinity-scrolling implemented. Another page allows you to filter by author, and ...
0
votes
1answer
53 views

AngularJS Routing not doing anything not working

I have following PhoneCat tutorial combined with an angular seed project. Now i come into the problem, i can't get routing to work / load, no errors occur and everything seems fine. Can't even seem to ...
1
vote
1answer
181 views

AngularJS how to change location path in routeChangeStart event?

in my application I'm using some query string parameters to resolve links for preselecting some data. But this parameters I would like to hide for users. For example I'm using routes like this ...
0
votes
1answer
58 views

AngularJS route does not render the template

I have two controllers and I'm using the AngularJS $routeProvider to load multiple pages. When I click on the link from the first partial to go the second one, the second partial does not render, and ...
2
votes
3answers
64 views

angularjs using variables in templateUrl

Im trying to use $scope in my templateUrl like this: app.config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/blog', { templateUrl: 'themes/{{ ...
0
votes
1answer
111 views

AngularJs route.reload(); infinite loops

i'm a newbie in AngularJS, i got some Jsonp files witch they're generated by drupal. My problem come when i'm trying to show the informations of my articles on my view. <!-- Script JS --> ...
0
votes
1answer
97 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
87 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
83 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
155 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
115 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
2answers
30 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, ...
1
vote
1answer
63 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
72 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
76 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
349 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
252 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
90 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
35 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
71 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
43 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 ...
1
vote
2answers
66 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
40 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
104 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
97 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
1k 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
59 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
50 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
42 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
46 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
85 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
135 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
497 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
72 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
122 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 ...
5
votes
3answers
606 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, ...
2
votes
5answers
80 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
49 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
83 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
351 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: ...
4
votes
2answers
1k 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 ...
37
votes
4answers
7k 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
306 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 ...
3
votes
4answers
3k 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 ...
157
votes
9answers
60k views

Delaying AngularJS route change until model loaded to prevent flicker

I am wondering if there is a way (similar to Gmail) for AngularJS to delay showing a new route until after each model and its data has been fetched using its respective services. For example, if ...