AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, 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
9 views

Can anyone explain how to use angular.mock.inject?

I'm learnng AngularJS and I have this question : can anyone explain the use of angular.mock.inject with examples ?
0
votes
1answer
14 views

Ng-transclude data from template in link

I have written the following Angular directive: angular.module('solarquote.directives', []).directive('editfield', function() { return { restrict: 'A', transclude: true, template: ...
0
votes
0answers
10 views

Modify variable into $http success function

I want to modify a external variable, but I don't know how to do it: $scope.insertLink=function(category){ //variable MODIFY category.insert_info = "cargando"; ...
0
votes
1answer
15 views

Anyway to trigger a method when Angular is done adding scope updates to the DOM?

I am looking for a way to execute code when after I add changes to a $scope variable, in this case $scope.results. I need to do this in order to call some legacy code that requires the items to be in ...
1
vote
1answer
14 views

$http get parameters does not work

Does anyone know why this not work? $http.get('accept.php',{source:link,category_id:category}).success( function(data,status){$scope.info_show = data}); and this work: ...
0
votes
0answers
5 views

Origin is not allowed by Access-Control-Allow-Origin in angularjs and asp.net mvc

OPTIONS http://localhost:7514/Employees/testrestricted 401 (Unauthorized) angular.js:10419 OPTIONS http://localhost:7514/Employees/testrestricted Origin http://localhost:4064 is not allowed by ...
0
votes
1answer
10 views

angularjs ng-grid dropdown not working with order by

I have an angular grid (ng-grid) where one ove the columns has a dropdown which is bound to a property of the objects displayed in the rows. <div class="gridStyle span9" ...
0
votes
1answer
10 views

passing host config to controller/service

I have a controller makes a $http.get request before scope is set by directive. How can I ensure that the required scope value is set first before the controller executes this ? I have a directive ...
0
votes
0answers
7 views

Test directive together with controller? Or: test directive with html2js

Using Mocha with Karma, I wrote a test for a directive. The directive uses templateUrl, so I used html2js and included the the html key as a module (that puts the template into the templateCache). ...
0
votes
2answers
22 views

Passing data between service and directive

The use case is simple, there is movie.json which contains the movie objects. Next I want to display these objects using directives which are nested movies -> movie. The mediator and data exchange I ...
0
votes
1answer
34 views

angular js '?' in ng-src causes infinite loop

I am trying to get a way around IE getting images from cache while using AngularJS I have this following code <img ng-src="./individuals/image/{{team._id}}/{{member._id}}{{getRandom()}}" > ...
-2
votes
0answers
17 views

redirection does not work angularjs requirejs

I have the following error using angular and RequireJS. redirection does not work and does not leave any mistake. Any ideas thanks. Code in plunker In my local machine does not work. I do not know ...
1
vote
1answer
22 views

Angularjs Argument is not a function got string

I am a newbie to angularjs. I am building an application where my home page will have a list of posts. I thought of using angularjs for two way binding for that page alone. I started with a sample ...
-1
votes
0answers
34 views

Get parent Element from the Controller

Is it possible to get the dimensions of the parent container (width x height) through the controller using angular (not jquery). For example: app.controller('appCtrl', function appCtrl($scope) { ...
0
votes
2answers
20 views

Using angulars ngResource get method

I have a basic controller defined in C#, its only purpose is to return whoever the current user is. namespace ProjectName.Controllers { public class UserController : ApiController { ...
1
vote
1answer
33 views

How to fix TS2081 && TS2087 errors in TypeScript 0.9

Just need to fix this errors. If it helps this app uses AngularJS. TypeScript version is 0.9.0.0 /path/app/scripts/Application.ts(22,13): error TS2081: Supplied parameters do not match ...
1
vote
1answer
28 views

How Can I Subscribe from an Angular Directive to Be Notified of Resize Events?

I have an element that is sized via Bootstrap and annotated with my custom directive myDirective1: <div class="span4" myDirective1>Hello, world</div> Inside my directive's linking ...
0
votes
2answers
27 views

Conditional Validation in AngularJS

I need to apply a validation on a form field only if certain condition is met. Say I have a form like this: <div ng-controller="MyController"> <form name="myForm"> <div> ...
0
votes
0answers
25 views

angularjs ng-class in nested directive

Tried so many different ways and still can't figure this. I have a menu with ng-class="{menuVisibleAnimation: menuOpen}" in a template in a nested directive. When I click on the button in the parent ...
0
votes
0answers
19 views

Emebed Vimeo video using AngularJS directive

I have a partial HTML page in an AngularJS app that I'm trying to add a vimeo video to. This template has an image and play button that fades out on click to show the underlying iFrame. I also want ...
0
votes
0answers
21 views

AngularJS Uploading An Image With ng-upload

I am trying to upload a file in AngularJS using ng-upload but I am running into issues. My html looks like this: <div class="create-article" ng-controller="PostCreateCtrl"> <form ...
1
vote
1answer
41 views

Beginner guide to test AngularJS controllers

Can someone please point me to a resource, where I can get a Beginner tutorial on how to write unit test for AngularJS controller? I have never written any test for JavaScript before. But, very ...
1
vote
1answer
24 views

How to implement authentication for mobile Django client based upon JqueryMobile, AngularJs, PhoneGap

I'm trying to create a one-site mobile app using AngularJS and jquerymobile, deploying it as a "native" app using PhoneGap. The one-page navigation is build up similar to this jsfiddle, using ...
0
votes
1answer
29 views

HTML template in AngularJS like KnockoutJS

HTML templates can be used multiple times with supplied data as object in KnockoutJS, I am getting difficulties in finding the same feature with AngularJS. Take a look at below URL of KO ...
3
votes
0answers
40 views

AngularJS “ng-submit” has problems when the browser pre-populates form fields?

I'm fairly new to AngularJS, and am experimenting with a single-page application having a "login" form. The form is bound by "ng-submit", and its controller makes an AJAX call returning a token if ...
0
votes
1answer
15 views

How to init JS libraries within directive's controller

I'm writing a directive to wrap plupload functionality. The directive is intended to be used as you can see here: http://pastebin.com/sddR0UL7 Here (http://pastebin.com/c09LWeu4) you can find the ...
0
votes
1answer
21 views

Show the input[type=file] filename at directive template

I'm trying to implement something like the bootstrap-file-uploader in pure angular. This bootstrap extension replaces the default file-upload widget with a consistent alternative (see this jsfiddle). ...
0
votes
0answers
22 views

angular $watch parent scope variable always fired

html <div data-select > <div data-set-tip tipit='selecting(tips)' ></div> <div data-show-tip headsup='selectingtips' ></div> </div> js ...
0
votes
0answers
21 views

Angularjs $http.post not working

i am trying to post user object using angularjs $http.post but everytime it prints "failed test" on firebug console. code is Controllers.controller('SignUpCtrl', function ($scope,$http,$location) { ...
0
votes
0answers
33 views

Angular.js - How to pass data from controller to view

This is the first time i am using Angular.js. So my workflow could be wrong. How do i pass data from controller to the view ng-view -> Displays html page using jade When user clicks on submit ...
1
vote
0answers
19 views

Problems implementing e2e test with Angular scenario and redi

I'm starting to write e2e tests in my django app using angular-scenario and i'm blocked since the very begining. I've opened a way in my app to fake user login so I can start testing the application ...
0
votes
0answers
17 views

Parsing html tags JSON Angular

I'm receiving the following JSON from my server, in reality the reviews array is filled with 20+ reviews but here I am only presenting one... { "reviews": [ "<br>We have found 20 ...
0
votes
1answer
24 views

Q - wait for operation to complete before invoking next operation

Within the primeData call in datacontext there are four queries to a back-end Web API service: function primeData(forceRefresh) { return (getLookups(forceRefresh) // this needs to complete before ...
0
votes
1answer
26 views

NG-Options doesn't let me set the value

Currently I am trying to load a selectbox using the ng-options directive. However I am not able to change the value of the created options, it just goes from 0-3 while I want those values to be ...
0
votes
1answer
16 views

Angularjs history support for IE6 and IE7

I am using routing in Angularjs for my SPA but I have to support IE7 (and IE8 in IE7 compatibility mode). I want the browser history to still work though. I don't care if I have to use a jQuery ...
0
votes
2answers
27 views

How can I pass multiple parameters separated with a ? and & using AngularJS $resource?

I have the following action in an AngularJS $resource getEntity: { url: '/api/:entityType/:entityId', method: 'GET' }, This sends something like the following to my server: /api/xxx/123 I would ...
1
vote
0answers
20 views

How can I simulate a click event in my AngularJS directive test?

I've tried following the format of the ng-directive-testing repo for a directive I've written. The directive basically renders an overlay when the user clicks on an element. Here's the directive ...
1
vote
1answer
31 views

AngularJS - change Content-type to “application/json” POST method, RESTful API

Hi guys i'm new at AngularJS and I needed your help.. All I need just need is to POST my json to the API and recieve the proper response. Here's my JSON where i don't know where to code this. JSON ...
0
votes
0answers
29 views

AngularJS + custom validations

I have some doubts about AngularJS + Custom Validations, from what I have read and checked by myself: AngularJS provides great helpers for simple field validation (ng-require, ...). The best way to ...
0
votes
1answer
12 views

How to create an object with properties in the resolve parameter in the route provider in Angular?

I want to pre-load data in my controller. I am doing this using resolve in the routeprovider: .when('/customers', { controller: 'CustomerController', templateUrl: '/Customer/Index', resolve: { ...
-1
votes
0answers
10 views

How to implement Cascading DLL with angularjs and mvc4 in Single Page Application

I'm trying to learn MVC Single Page Application with angularjs, and i've no idea that how to implement Cascading Drop Down List in it. Any help is appreciated. Thanks in advance, Naga Phaneendra.
0
votes
0answers
12 views

Submitting a form from an external controlller button for validation

If you look at my fiddle I'm not sure why the internal 'Submit' button triggers browser validation (as per the required attribute) but the 'External Button' doesn't? The external button calls the ...
0
votes
1answer
27 views

Angular.js — use ng-show to show element only if other element is not disabled

I have an element that I would like to show only when another form element is NOT disabled. <input ng-model="myModel"> None of the following work: <div ng-show="myModel"> This will ...
0
votes
1answer
22 views

How to inject dependencies in app.config in angularjs?

I've been getting errors when minifying my AngularJS app because manually injected dependencies aren't working how I'd expect. The following didn't work: var config = ...
0
votes
1answer
33 views

AngularJS: Protecting routes with angularjs depending if the user is authorized?

I have just started out working with an AngularJS app I'm developing, everything is going well but I need a way of protecting routes so that a user wouldn't be allowed to go to that route if not ...
1
vote
1answer
31 views

Firefox draws red border on required select box

Firefox 21 draws red borders around required select-boxes when they are bound to an angularjs-model. <select ng-model="color" ng-options="c.text for c in colors" required> <option ...
0
votes
0answers
16 views

Angular UI Bootstrap dialog generating duplicate markup

In my app I'm using angularjs and angular-ui-bootstrap. I have a simple controller for my application in which I open a dialog like so: var kbapp = angular.module('kbapp', ['ui.bootstrap.dialog']) ...
0
votes
1answer
24 views

Correct way to manage UI state and animation with angularjs

I'm beginning to convert a large web application, with a lot of complex JQuery DOM manipulation and an ASP.NET MVC backend, into something more manageable. I'm converting the server-side code into a ...
1
vote
1answer
41 views

angular error : object has no method push

I am trying to make a angular work with a REST service and $resource. it works to GET the datas from JSON, but when updating whith $save() or a custom method called $rec(), i have an error in the ...
0
votes
3answers
24 views

Binding with radio's not working in Angular

Using ng-repeat I display some radio's in the edit form: <label style="float: left;margin-right: 3px;" data-ng-repeat="gender in genders" data-ng-hide="$first"> <input type="radio" ...

1 2 3 4 5 146