0
votes
1answer
17 views

Show form using custom directive - AngularJS

I have a button with ng-click function. When I click the button, it should show the form which is coded in a templateUrl using a custom directive. Which function should I use to get the screen ...
0
votes
2answers
22 views

calling ng-view controller method from outside controller?

HTML: <html ng-app="san"> <head> </head> <body ng-controller="sanctrl"> <div> AngularJS</div> <div ng-view=""> </div> <button type="button" ...
0
votes
0answers
16 views

conflict with routing on route updata

on angular i have very strange error i have defined that method so i can manager access to routes basically what i am doing is if the user is logedin he goes to home page another than that he should ...
0
votes
1answer
34 views

AngularJS use data from one page to print a report in another

I have a domain object on which multiple procedures might be performed, each procedure might (or might not) have pre-configured reports to be generated. When viewing the details page of the domain ...
0
votes
0answers
36 views

Non-single-page-app: Use pushState to change URL in the address bar on click

So my app is not SPA. I use Angular in certain spots and sometimes on a whole page but what I see in my address bar is my server page (PHP). Now, there is a page where I'd like to have my categories ...
0
votes
0answers
51 views

How to dynamically add routes/templates to a SPA angularjs application

I have a single page application, with a container html page like the following: <!DOCTYPE html> <html lang="en"> <head> <title>...</title> ... </head> ...
0
votes
1answer
102 views

How to pass $scope data between two partial files in angularjs

How can I pass data in two partial html files using angularJS, totally weird cant get through it. I have one index file [fine.], I login and reach view5 [partials/blog.html] which is written in ...
0
votes
0answers
31 views

Adding scripts on route config

Upon learning Angular Route Styles, It's easier to apply different styles on different templates. Since it makes it so dynamic, I was wondering if there's a library to append scripts file(s) ...
0
votes
0answers
100 views

Angularjs initialize multiple controllers at startup?

i have a normal navbar with a menuController, this is the parent. then i have two other controllers a DashBoardController this is loaded on startup and a LoadDataController this is called if i click ...
0
votes
1answer
64 views

Loading the partial files after the http call inside the controller

I am having a controller and a partial file. The partial file tries to access a variable which was set by the controller. But the issue here is that the controller populates the scope object with the ...
0
votes
1answer
75 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
0answers
258 views

angularjs ui router directive after ui.view loaded

I've got a mixed menu I mean there is my animation + ui-router animation html <ul class="nav navbar-nav"> <li data-ng-class="{ active: $state.includes('index') }"><a ...
1
vote
1answer
211 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 ...
1
vote
1answer
69 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', ...
2
votes
0answers
47 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
133 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
43 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 ...
1
vote
0answers
556 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 ...
3
votes
2answers
867 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 ...
3
votes
5answers
129 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 ...
3
votes
1answer
770 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
466 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
906 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
458 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 ...
10
votes
3answers
9k 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
104 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
45 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
1k 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, ...
4
votes
3answers
8k 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
4k 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
119 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
2answers
2k 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 ...