AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability and reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

How to write an angularjs directive that makes use of both scope and attributes and refer it thru compiled partial?

I want to write a directive which takes advantage of custom attributes, as follows: <plant-stages title="Exploration du cycle de développement de la plante" ></plant-stages> The ...
-1
votes
0answers
8 views

Add AngularJS directive at runtime

I am creating a game where the first thing that needs to happen is some state is loaded in from an external JSON file - the contents of one of my directives are dependent on this data being available ...
0
votes
0answers
6 views

AngularJS details directive doesn't work on firefox

I am using the angularJS 1.3, and found that the directive doesn't work on firefox 29. Even the test page on the angular site doesn't show the arrow, ...
0
votes
0answers
6 views

why do develpoers sometimes generate a dynamic form and post it while post ajax are readily available?

var post = function() { angular.element('body').append('<form name="name" action="http://webservice.com">') angular.element('form[name="myForm"]').append(function(){ var ...
0
votes
0answers
12 views

Unit testing a controller that resolves a service

I am trying to write a test for my home module but I keep getting an error saying "unknown provider: service". If I change resolveSomething in my home module to return a string my app works so I know ...
0
votes
1answer
5 views

AngularJS toggle string on click

<button id="visibilityStatus" ng-model="visibilityStatus" ng-click="visibilityEnable()">Enable</button> $scope.visibilityEnable = function() { ...
0
votes
1answer
17 views

ng-model with predefined select options

Ok, I'm sure this one is super simple, though it's evading me. I have a very simple dropdown select menu - as shown below - with predefined options. I am setting the $scope.qty in my controller and ...
0
votes
1answer
15 views

How to check if all async operations have finished using AngularJS?

Lets say I got three different functions that make $http calls. The three functions are called one after the other. Is there any way to know when all of them have finished?
0
votes
0answers
18 views

Set radio button state based on a value received from REST

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
8 views

Add and remove elements from a single table without affecting ng-repeat array

I use ng-repeat to generate some tables, like this: <table ng-repeat="table in tables"> <tr ng-repeat="row in rows"> <th> <a href='#' ng-click="removerow()">remove ...
0
votes
2answers
11 views

Or condition in filter

Is it possible to write a simple or condition in a filter like the following?: formResponse in formResponses | filter: { formName: form } || filter:{ formCategory: formCategory }" I know that the ...
0
votes
0answers
8 views

Unit test private method

In typescript, what is the best way to test a private method. While testing a controller in Angularjs, sometimes controller add a property (function) to $scope, and if I do not make the property ...
1
vote
1answer
18 views

(another) request for clarification about the meaning of “singleton” in Angular

I'm learning angular, experimenting with different ways of using services/factories, and am trying to wrap my head around the unique sense in which they are "singletons". I have an API service that ...
0
votes
0answers
9 views

D3.js SVG not clickable inside angular-ui tabs

I'm trying to use D3 inside of an angular-ui tab. Specifically, a clickable canvas where I can add and drag little black circles. If I put the svg element inside the tab, no clicks get registered. If ...
0
votes
0answers
11 views

ng-repeat moves dom elements around, which breaks a ckeditor because it doesn't support having it's dom elements moved

I'm trying have an ng-repeat which contains divs that include a CKEDITOR instance. The list is sortable by a few different properties. However, when the list is resorted, the CKEDITORs break because ...
1
vote
0answers
9 views

Bootstrap UI / AngularJS: Is it possible to override closeDrowpdown in dropdownService?

I'm using AngularJS with Bootstrap UI to create a dropdown menu using the Dropdown directive. I would like to override it so that the dropdown menu does not close when clicked. Here is the specific ...
0
votes
0answers
21 views

Angular.js changes doesnt applying to rails api

Im dealing with some problems when changing data at the angular.js controller, the data changed in angular, doesnt apply to the rails api. The data seems changed but when refreshing the page, the ...
0
votes
0answers
10 views

Angularjs: Partially animating ng-view on page transitions

I have an angular app with a shared actionbar between ng-views: <body> <div ng-include src="'actionbar.html'"></div> <div ng-view class='slideOutLeft'></div> ...
0
votes
3answers
28 views

How can I CSS Header Logo Swap with transition for responsive UI

I have the following code to transition to a mobile image when the browser resizes, but the change it too abrupt. I want it to animate. Is there a way? Also, I am using Bootstrap and AngularJs, so am ...
0
votes
2answers
23 views

Angular Controller showing $ is not a function error

I am trying to $http get a template file inside a controller and compile it to a div id like this: function PagesController($scope, $http, $route, $routeParams, $compile) { ...
1
vote
0answers
11 views

AngularJS: Custom $anchorScroll provider execution

I need to scroll to a specific anchor tag on page reload. I tried using $anchorScroll but it evaluates $location.hash(), which is not what I needed. I wrote a custom provider based on the source code ...
0
votes
0answers
16 views

Getting a script error with an angular app on ie

My angular app does not work in ie hosted on a basic IIS webserver. The App works correctly on my local webserver with IE however if i go to the website i get the following errors: SCRIPT5014: ...
0
votes
0answers
17 views

Bootstrap 3 affix header for table?

I am working with Bootstrap 3.0 and AngularJS 1.2. I have a large table, and above the table I have a row with controls for filtering the data in the table. I am trying to use the "affix" feature ...
-1
votes
3answers
19 views

Angular How to get the video ID from a full YouTube URL

In my data object I have a full YouTube URL (http://www.youtube.com/watch?v=kJ9g_-p3dLA). In my partial I need to extract the video ID from this string (kJ9g_-p3dLA). I'm trying not to resort to ...
0
votes
1answer
27 views

jQuery scrollTo in AngularJS

Until now I have always been using jQuery for my single page "scroll to div" applications, but since in making an Angular app (just for learning purposes) I try to do everything in angular instead of ...
0
votes
0answers
24 views

AngularJS: Why am getting an “Error: [$injector:unpr]” error for a factory but not service?

I have two blocks of code, one is a service and the other is a factory. Adhering the minification best practices, I have injected the dependencies as such: Service ...
0
votes
1answer
17 views

Directive not being called for element with closing tag, but works fine on self-closing

I am writing a directive to simplify my HTML, but it is not being applied to elements that are written as <blah></blah>, even though it is being called to elements written as <blah ...
0
votes
0answers
24 views

Loosing angularjs bootstrapping because of ng-controller

I'm new to angular and not very familiar with javascript and jade so my questions could sound stupid. My webapp is based on this website: ...
0
votes
1answer
16 views

Angular javascript animation not working

I've got an issue with an Angular JavaScript animation not working... Within the directive I'm calling: $animate.addClass(element, 'test'); But for some reason the animation isn't registering that ...
4
votes
3answers
30 views

What is a good pattern for reporting errors when incorrectly using a re-usable directives in Angular?

What is a good pattern for reporting errors when writing re-usable directives in Angular? I'm writing a few components as angular directives, with the intention of re-using them, expecting that ...
2
votes
2answers
46 views

Returning a $promise from two resource calls in AngularJS to delay route change

Use Case Using a route provider, returning a $promise in the resolve will avoid the data popping up after the UI has loaded. However, I'm having trouble processing two different resource calls and ...
0
votes
1answer
15 views

Angular JS orderBy attribute reserve table

I'm trying to create a table which can be reverse-ordered. Somehow, with particular <th> tags, Value (bit) and Value (byte) it isn't reversed. My AngualrJS code: function DataCTRL($scope){ ...
1
vote
1answer
28 views

ng-class with nested property

I have troubles with using ng-class with nested properties: This work ng-class="{'fullscreen': isFullScreen()}" This doesn't work ng-class="{'fullscreen': vm.isFullScreen()}" Am I missing ...
1
vote
1answer
19 views

AngularJS - filter logic from controller works, not being displayed correctly

I am trying to use a filter that I have written in my controller to narrow down a select list using ng-options. The filter logic is working, but the results aren't getting displayed. Here's the ...
0
votes
0answers
37 views

Adding controllers dynamically to a module in Angularjs

In one of my partial views I want to include another script that will create controllers which will be used in this partial view. Is it possible? Here's the plunker: ...
0
votes
1answer
31 views

In angular, how to use orderBy with ngRepeat on fields that are displayed using filters, changing their actual content?

I'm iterating over an array of objects using ngRepeat. The objects have a field "teamId". Inside the iteration, I'm displaying the field using a filter like so {{object.teamId | teamName}}, where the ...
-2
votes
1answer
18 views

Angular view Changes does not reflect on localhost in window 8

I am facing an unusual problem here. I am using window 8 for development and the environment is xampp . I am using laravel and angularjs for building an app. But in windows changes done using angular ...
2
votes
2answers
21 views

Unexpected behaviour with AngularJS submit on enter

I need to make simple form with order tracking functionality with AngularJS. I created the following jsfiddle: http://jsfiddle.net/MVVcf/2/ When we hit enter on the first time the submit is working, ...
-1
votes
1answer
17 views

AngularJS animation on click

I'm trying to add a directive that animates the element when it is clicked, but the code in my directive never seems to trigger. Fiddle html: <img class="refresh" animate-spin ...
0
votes
2answers
13 views

How to mock call to navigator.geolocation in Protractor tests

Let's say you have an Angular app that's showing a list of places. There is a button to get your current location, and clicking the button orders the list according to distance from your location, ...
0
votes
2answers
27 views

Angular controller being called 10 times on init

I am in the early stages of learning AngularJS and am seeing a strange behavior. When my page loads, the associated controller is called 10 times. I have a fiddle here that reveals behavior. As you ...
1
vote
1answer
35 views

AngularJS Methods attached to the scope vs within the scope of the controller

I am starting to re-factor the project we have been working on for a couple of months. There has been a lot learned about Angular along the way, and many of this will be implemented in the ...
0
votes
0answers
12 views

Keyboard navigation in AngularJS table

I'm trying to port a special table/grid form made in Windows (Delphi VCL) to an Angular app. A simplified version of the angular app can be tested here: jsFiddle demo. User can add as many rows as ...
0
votes
2answers
11 views

Pass parameters to controller in defined route?

Say I have an app defined as such: angular.module('myApp', ['myControllers']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/', { templateUrl: ...
0
votes
1answer
10 views

How to set the default sorting order for this AngularJS website?

I am using AngularJS. I would like to make a table to sort by the first column immediately after the webpage finish loading. The HTML table code looks like this; <table class="table table-hover ...
1
vote
2answers
27 views

Angular: How do i check if the select-element is multiple and set a selected option?

An Angular Service, responsible to build URLs from values of select and multi-select elements drives me crazy. A multi-select uses an array to store its selected values, even if there is only one ...
0
votes
0answers
5 views

Angular protractor executeScript / executeAsyncScript: Maximum call stack size exceeded

I'm trying to retrieve the isolated scope on a directive in protractor using the following code: protractor.executeAsyncScript(function(callback){ var isolatedScope = ...
0
votes
1answer
19 views

Breeze EntityManager cache not cleared after successful server save

I've been trying for a few days now to get the Breeze 1.4.9 to work with a rails back end in a different manner than the Breeze Ruby SPA sample. I would rather send bulk save changes instead of ...
3
votes
1answer
35 views

When using a JavaScript toolkit or framework, what a suggested accepted policy in consumption of MVC model data?

In a .Net MVC world, we have access to model data at the view level, and can easily make use of Razor syntax to iterate through lists, etc. However, with the incorporation of a js framework like ...
1
vote
2answers
26 views

How to mark input as dirty via HTML?

I have an input and I would like to set the input as dirty right away: <input ng-model="something"> I tried: <input ng-model="something" class="ng-dirty"> but it does not work.