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 ...
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
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
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 ...
0
votes
0answers
80 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: ...
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
2answers
79 views

How to globally resolve a dependency (preload current user from server)

I know I can resolve certain dependencies for a controller based on the route. However, I have a service that I always want to be resolved: The current user. The service basically does a get request ...
0
votes
1answer
450 views

Sharing a webservice's data across controllers in AngularJS

I have 2 big issues with an Angular app, I'm completely stuck and hoping someone out there can help me. My method of sharing data from a web-service out to multiple controllers is flawed and I don't ...
1
vote
0answers
74 views

Virtual URL in angularJs with routeProvider

I have a list of items app/#/items, and a form to filter the item by the location that it's located in. I use dirty checking to trigger a method of a service that communicates with the Backend and ...
1
vote
0answers
371 views

AngularJS - “10 $digest() iterations reached” when ng-view ng-repeat dependant on $routeParams

I am really new to Angular and this is the first time that I am dealing with routing, so please excuse me if my questions are a bit confusing. My actual logic and structure for this app is much more ...
3
votes
2answers
229 views

Single page app, permalinks and ngView?

This is my current setup, with each column being represented by a controller: <navbar></navbar> [column1] [column2] [column3] <footer></footer> Additionally each column has ...
4
votes
3answers
7k views

Simple Angular $routeProvider resolve test. What is wrong with this code?

I have created a simple Angular JS $routeProvider resolve test application. It gives the following error: Error: Unknown provider: dataProvider <- data I would appreciate it if someone could ...
0
votes
1answer
1k views

AngularJS: service query returning zero result

my app.js looks like var app = angular.module('pennytracker', [ '$strap.directives', 'ngCookies', 'categoryServices' ]); app.config(function($routeProvider) { console.log('configuring ...
1
vote
1answer
320 views

AngularJS memory leak with ng-switch? Can someone solve this?

I've built a custom routing method for angularjs and I use this to control ng-switch within my app in order to create multi level deep linking. http://plnkr.co/edit/beAm3WRomMafKzx1SoSZ?p=preview ...
1
vote
2answers
279 views

Angularjs route with unchanged data, avoid re-rendering templates for controllers for that route?

If I am changing a route, and the data for that route has not changed, can I avoid re-rendering my templates for the controllers for that route?
1
vote
1answer
217 views

Getting AngularJS $route to redirect to a specific state

I have specific viewing states that I want users to be able to link to. I'm trying to route a controller to a specific state of the page when a user goes to http://localhost:3000/resource/#!/1 My ...