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
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', ...
1
vote
0answers
19 views

GoogleMaps-Partial stops working in AngularJS

I am working on a web project with AngularJS + Foundation 5, and I am actually having some troubles with the partial views. There is no problem when I write everything in the same index.html page, but ...
0
votes
1answer
30 views

AngularJS viewContentLoaded not executing on page refresh and initial load while using directive

I am experiencing some inconsistencies when using a custom directive and relying on the viewContentLoaded event to run... Below is a "bare-bones" version of the problem: var myApp = ...
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
36 views

Angularjs — Using directives for data load or resolve

I'm working on a large mobile application and I've come across a debate. Currently I have the resources for the various rest api's wired into a directive which then loads the data into the scope at ...
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 ...
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 ...
2
votes
1answer
557 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 ...
1
vote
2answers
239 views

routingProvide not found AngularJs

I am just trying to learn Angular.Js and got stuck here watching a tutorial. I just created a demo App with the following code ... and I am getting an the following error. Any help would be greatly ...
2
votes
1answer
515 views

AngularJS How to get additional routes parameter

Is there a way to add extra parameters to the $routeProvider and retrieve this parameters in a directive? I need this because the variable is page specific. I would like to add a parameter pageName ...
0
votes
2answers
317 views

ngClick on anchor tags causing problems in Angular

I've got ngClick directives on the anchors tags inside my main navigation, to make the menu "disappear" off canvas after clicking it: <a href="/#/profile" ng-click="showNav = false"> It's ...
5
votes
3answers
5k views

AngularJS - Need some combination of $routeChangeStart and $locationChangeStart

My problem is actually very similar to the one found here: AngularJs - cancel route change event In short, I'm using $routeChangeStart and trying to change the current route using $location. When I ...
1
vote
2answers
95 views

AngularJS partials with URLs in directives - best practice?

I quite like how angular-ui has created ui-routes, which provides named routes (among other things). Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best ...
0
votes
1answer
40 views

Link route to directive? Or another way?

I have an unusual question. I have this old page that I want to convert to angular.js. http://transience.me/TD/ I have 5 pages worth of html loaded on one page and the only visible portion is the ...
6
votes
1answer
659 views

How to remove index.html from url on website based on angularjs

I didn't find a way to remove index.html from the url, because like this looks really ugly. mydomain.com/index.html#/myview1 mydomain.com/index.html#/myview2 Is there a way to remove that part, ...
0
votes
0answers
93 views

can't connect json file

I tried to learn the Tutorial / step_08 at http://docs.angularjs.org/tutorial/step_08 But I could not connect the JSON to the Template and the main HTML page. I've included the code I wrote - I'd be ...
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 ...
2
votes
1answer
2k views

angularjs Directive not reacting to attribute change

I have a chat directive that I use to place a chatroom in on the page. mod.directive('chat', function () { return { templateUrl: '/chat', replace: true, scope: { chatID:'@chat', ...
0
votes
1answer
3k views

AngularJS ng-template Directive Not Found in routeProvider

I am attempting to include multiple partial templates to be included in an ng-view, but the routeProvider directives are always trying to fetch the file from the server (not the embedded ng-template). ...
1
vote
0answers
108 views

Way to use AngularJS in a magazine reader app

I'm learning AngularJS to make an app like this one. The example site uses a global JS object for one issue of a magazine to manage pages of it, and uses click handlers to deal w/ page switching and ...
4
votes
1answer
1k views

How can I easily implement multiple layouts in Angular JS?

I need to be able to specify different layouts for different routes, and most preferably I would like to be able to define layouts and other parameters in an object in route config and have them ...