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

learn more… | top users | synonyms (2)

0
votes
1answer
15 views

angularjs mock http service (Using $httpBackend) to respond with some data to the success method of Promise API

I tried to interpret simpler version of my question. 1)I m writing Unit tests forcontroller(myController) method(subtract). 2)mocking http using httpbackend i want to return a response of 200 to ...
0
votes
2answers
5 views

AngularJS Counting Number of Specific Items Starting With a Value in JSON Dataset

I have a set of JSON data: "MyMessages": [ { "Code" : "N101", "ID" : "History", "Indicator" : "Down", "PosChangeMessage" : "test test test ...
0
votes
0answers
6 views

How Can i pass the kerbrose token from angularjs

I have a MVC application and project is windows authentication enabled if i am calling the controller from angularjs javascript ($http.get ) function getting 401 error, how can i pass the kerbrose ...
0
votes
2answers
54 views

java script - using parse.com query with angular ng-repeat

I make a query from parse.com angd get and array of 2 object. Now I want to user ng-reapet('phone in phones') , so I need to convert it to json. I didn't suucess to do it. for some reason, it doesnt ...
0
votes
1answer
12 views

Angular for loop $http wait until finish

I have this factory produccionApp.factory('eskuratudatuak', function ($http, $q){ return { getNestedDataBetter: function (desde, hasta){ return $q.all ( ...
-1
votes
0answers
7 views

AngularJS ng-repeat with multiple radio inputs

I've got small problem with ng-repeat on persons with multiple radio inputs (yes/no). Input names should be different because of name="person.name" but it behaves like they all are the same. Somebody ...
-1
votes
0answers
7 views

Angularjs error “Cannot read property 'childNodes' of undefined” when trying to use angular.element

I am using requirejs with angularjs and I am trying to use jquery datatables plugin and attach it to an element inside a controller like this require(["myApp"], function(myApp) { ...
0
votes
2answers
19 views

Gmail API - Parse message content (Base64 decoding?) with Javascript

I'm trying to use the Gmail API to get a user's email, grab the message subject and body, and then display it on a webpage. I'll be doing other stuff with it, but this is the part that I am having ...
0
votes
0answers
8 views

ng-route- Parameters with Special Characters

myApp.config([ '$routeProvider', function($routeProvider) { $routeProvider .when('/getAttributes/:product/:code/:name/:name', { templateUrl : 'view/attributes.jsp', controller : ...
0
votes
1answer
15 views

Dealing with a 301 and location headers for a REST response in cross-domain

I am using Angularjs Chrome 35.0 and Firefox 30.0. I need to make Rest requests to an API. Every single request which have 200,201,404 (...) as response does work well. Some of those responses ...
0
votes
0answers
16 views

Table style view and AngularJS

I have a prbolem with AngularJS and table view. I have a JSON-data like this (for example): { { name: 'Item #1', description: 'Item #1 description' }, { name: 'Item #2', description: 'Item #2 ...
0
votes
0answers
7 views

Unable to pass an object to an AngularUI modal

I've recently started my studies of AngularJS, and am researching the uses of the Angular UI for Bootstrap framework. However, I've hit a snag in a really basic test case! Fiddle: My Failing Modal ...
2
votes
3answers
24 views

hiding an option in ng-options

I'm pretty new to Angular and trying the ng-options. In my controller, I have: $scope.permissionLevels = [ { value: "ROLE_READ", text: "Read Only" }, ...
0
votes
2answers
30 views

Adding Newline in HTML w/ AngularJS

I'm trying to get AngularJS and/or HTML to print out the following on 2 separate lines: FOO BAR But my following HTML and JS are showing it on the same line despite my newline \n. HTML <div ...
1
vote
0answers
13 views

My working $.ajax doesn't work on angularjs $http

I've found no way of solving this. I have a jQuery ajax call that has always worked. I'm creating a new app with Angularjs (I'm new) and my new, Angularjs, ajax worked perfectly. When I test ...
0
votes
1answer
16 views

Two Objects In Select Dropdown Using ng-model

I'm currently taking an object and placing it into a select dropdown of 'Employees': $scope.Employees = [{ "id": 1, "name": "George", "job": "Janitor".. .. which populates some ...
0
votes
0answers
5 views

Compile inside test don't create the required result

I'm using karma for unit test my angular directive. I've removed parts from my directive until I removed it all, but I'm obviously missing something. this is the test: element = ...
0
votes
1answer
21 views

protractor is not waiting for ui-router to change state

I'm using protractor for system tasting my ui-router SPA application. As I understands the documentation, protractor should wait for things to happen before/while angular is playing. for instance, ...
0
votes
2answers
14 views

angularjs model reload after item delete

I'm pretty new in angularjs and I have no idea how do this. <div class="userData" ng-repeat="user in users"> <div class="float" <img ng-click="deleteUser($event)" src="myurl"> ...
0
votes
1answer
8 views

ui-select2 inside directive bind to outer scope

I'm nesting select2 input inside a directive and I want to bind the selected values to outer scope. how can I do that. plunker example directive code: app.directive('optionChoices', function () { ...
0
votes
0answers
6 views

How to use angular ui-mask to mask a phone number with optional extension?

We have the demo here on the angular-ui page. Wondering how we can write a mask with optional extension number. (999) 999-9999 ext. 999 will make the extension required.
0
votes
1answer
19 views

pass by ref to service

can I pass a parameter to a service by ref in angular js? for example: var img = //image object from the view MyService.ChangeSrc(img); is it possible that the src can be changed in MyService ...
1
vote
2answers
104 views
+50

symfony2 REST, AngularJs access-Control-Allow-Origin

okay I am desperate. I am using FOSRestBundle and NelmioCorsBundle I am still getting this error when I am trying to post data by angular from different server: XMLHttpRequest cannot load ...
0
votes
1answer
12 views

How to use uncss by addy osmani with a Single Page MEAN stack application

I've created a application using the MEAN stack which was generated by Yeoman angular-fullstack I would love to include uncss to my grunt build. Unfortunately, this is not possible given that the ...
0
votes
0answers
12 views

Dynamic NG-Controller Name

I want to dynamically specify a controller based on a config that we load. Something like this: <div ng-controller="{{config.controllerNameString}}> ... </div> How do I do this in ...
0
votes
0answers
8 views

Pass Parameters to ui-route

I have an angular app in which i was using Modal Dialog boxes. Earlier in my app, i used to pass parameters to this modal as follows: ng-click="open(id, studentid)"> and in the js file, i had ...
13
votes
6answers
1k views

Mocking and Stubbing with protractor

I want to test my angular app with protractor. The app has an API Module that talks to the server During these tests I want to mock this Api Module. I don't want to do full integration tests, but ...
0
votes
1answer
32 views

Testing directives in Ionic framework

I am trying to test directives in an app that uses Ionic framework (Angular) on a Testem server describe('task lists', function () { var html, scope, element beforeEach(function () { ...
1
vote
2answers
4k views

Conditional data show hide in Angularjs

I am working on an application where I have to generate a table report, based on user filter. And user can filter the result and submit new query using different parameter. Depending one of the ...
1
vote
0answers
26 views

What is the best way to set AngularJS $provide.constant values from a C# MVC Model?

I have an AngularJS application with a .NET MVC/WebAPI backend. I have one MVC action that serves up my main HTML page that loads my AngularJS app. This MVC action loads several application settings ...
0
votes
0answers
6 views

Do I need to define the Module dependency when unit testing a Controller in Karma?

I have a project with AngularJS + RequireJS + Karma + Jasmine. My project structure follows: lib --angular.js --angular-mocks.js --require.js node_modules --(...) test --test-main.js --spec ...
1
vote
1answer
26 views

How can I sync two simultaneous $interval promises in Angularjs

Struggling to get my head around angular $interval functions. I want to start a progress bar and a timer at the same time and I want them to complete at the same time. Feels like it should be easy ...
3
votes
2answers
38 views

AngularJS: directives vs. controllers - What logic to put where?

I'm quite new to angular and try to really learn how to organize my code, so future coworkers will be able to find their way around it quickly. One rule I know is "If it manipulates the DOM, put it ...
0
votes
1answer
27 views

Scopes in Angular not inheriting correctly

I have an ApplicationController on the body tag. Inside this controller I am setting the username on a response from the server. Somehow the username variable is only available within the ...
87
votes
4answers
86k views

if else statement in AngularJS templates

I want to do conditions in AngularJS template. I fetch a video list from Youtube API ands ome of the videos are in 16:9 ratio and 4:3. I want to make a condition like this: if video.yt$aspectRatio ...
0
votes
0answers
6 views

how to combine the customer header and filter in ngTable

I would like to create a ngTable that is the combination of the example of #4 (filter) and #18 (customer header). Can anyone show me how? Thanks!
0
votes
0answers
4 views

Caching dom elements or whole views

I'm using angularjs version 1.2.19 on Chrome browser. I have a SPA (single page application) with several views (8 at the moment). Each view is packed with dynamic objects (like kendoui widgets, ...
0
votes
1answer
46 views

How to resize canvas according to upload image in javascript?

I have the following code: <script type="text/javascript"> //start pdf to canvas ... //end pdf to canvas var a="123_m"; var imgname = "images/im/"+a+"/2"; var side = 1; ...
1
vote
3answers
24 views

index of li in AngularJs

Using AngularJs & Bootstrap. Trying to get the index of each li item so that, I can color each of them different. How can I do that. Tried something like this. HTML : <ul> <li ...
1
vote
1answer
16 views

ng facebook with facebook comments

I am using ng-Facebook service in my angular web app. I want to include a Facebook comments plugin. So, I have copied the code in the Facebook plugin with the Javascript SDK. I can see the comments in ...
0
votes
3answers
31 views

Passing element in ng-click

I need to pass an element in ng-click as a param. <textarea id="chat-msg" name="chat-msg" class="p-r-40 chat-reply form-control"></textarea> <img ...
1
vote
0answers
16 views

Compile template without appending to document with custom scope

I need to compile remote template (template.html file) with some values and to get the resulting html without appending it to the page.Can you give me some advice? angular.module('myApp') ...
2
votes
2answers
41 views

Login exist check Angular JS

I'm writing a registration form with angular, but I'm still new to this framework. I got the password match validation like that: <div class="form-group"> <label ...
1
vote
0answers
90 views

I just built my AngularJS project using gruntjs, but when I load the result in my browser, I get a blank page, how do I begin debugging this?

When I built my project, I had Grunt copy everything to ~/Web, which is where Apache serves pages from. I've tried running grunt build --debug --verbose and getting back no errors or warnings. I've ...
0
votes
0answers
12 views

google api onload in angularjs

This is basically the example code of the picker and it works in the html: <script> function createPicker(){ var picker = new google.picker.PickerBuilder() .addView(new ...
0
votes
1answer
11 views

AngularStrap data-start-date not allowing date selection

I've got this angular datepicker <input type="text" bs-datepicker data-start-date="01/10/13" data-end-date="29/04/14" placeholder="Earliest date" id="BoundaryFrom" name="BoundaryFrom" ...
23
votes
2answers
4k views

Unit-testing directive controllers in Angular without making controller global

In Vojta Jina's excellent repository where he demonstrates testing of directives, he defines the directive controller outside of the module wrapper. See here: ...
0
votes
2answers
23 views

AngularJS UI Typeahead - Styling one of the properties of the result

I've been using this thread to guide me through using the fantastic typeahead directive. I'm a little stuck however. I need to apply styling to ONE of the properties on the results. I have a ...
0
votes
2answers
40 views

AngularJS checkbox dynamic ng-true-value expression

I'm trying to build a calculator for daycare prices in Angular. Every location in the company franchise has separate prices for every day. So my thinking was to build a form, with first a select that ...
0
votes
1answer
19 views

AngularJS searchbox directive or how to avoid code duplication in controller

I'm working on multiple school student management application. The are multiple roles: school manager and super manager. The school manager can only search students in his school while super manager ...