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)

111
votes
1answer
14k views

What are the nuances of scope prototypal / prototypical inheritance in AngularJS?

The API Reference Scope page says: A scope can inherit from a parent scope. The Developer Guide Scope page says: A scope (prototypically) inherits properties from its parent scope. So, ...
1216
votes
4answers
120k views

How do I “think in AngularJS” if I have a jQuery background?

How do I “think in AngularJS” if I have a jQuery background? Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the ...
347
votes
4answers
68k views

Databinding in angularjs

Could someone explain to me how databinding works in the AngularJS framework? I haven't found technical details on their site. It's more or less clear how it works when data is propagated from view to ...
83
votes
9answers
28k views

Delaying AngularJS route change until model loaded to prevent flicker

I am wondering if there is a way (similar to Gmail) for AngularJS to delay showing a new route until after each model and it's data has been fetched using its respective services. For example, if ...
8
votes
5answers
3k views

ngModel and component with isolated scope

I am creating simple ui-datetime directive. It splits javascript Date object into _date, _hours and _minutes parts. _date uses jquery ui datepicker, _hours and _minutes - number inputs. See example: ...
23
votes
5answers
19k views

AngularJS - Processing $http response in service

I recently posted a detailed description of the issue I am facing here at SO. As I couldn't send an actual $http request, I used timeout to simulate asynchronous behavior. Data binding from my model ...
26
votes
3answers
14k views

How can I pass variables between controllers in AngularJS?

I have two angular controllers: function Ctrl1($scope) { $scope.prop1 = "First"; } function Ctrl2($scope) { $scope.prop2 = "Second"; $scope.both = Ctrl1.prop1 + $scope.prop2; //This is ...
103
votes
3answers
16k views

Angular.js: service vs provider vs factory?

I'm sure this has bothered you - it has bothered me for some time now. What are the differences between AngularJS module's service, provider and factory?
50
votes
4answers
15k views

Call Angular JS from legacy code

I'm using angular to build HTML controls that interact with a legacy Flex application. All callbacks from the Flex app must be attached to the DOM window. For example (in AS3) ...
59
votes
7answers
28k views

Can one controller call another in AngularJS?

Is it possible to have one controller use another? For example: This HTML document simply prints a message delivered by the MessageCtrl controller in the messageCtrl.js file. <html ...
46
votes
3answers
3k views

When writing a directive, how do I decide if a need no new scope, a new child scope, or a new isolate scope?

I'm looking for some guidelines that one can use to help determine which type of scope to use when writing a new directive. Ideally, I'd like something similar to a flowchart that walks me though a ...
21
votes
2answers
9k views

this vs $scope in AngularJS controllers

In the "Create Components" section of AngularJS's homepage, there is this example: controller: function($scope, $element) { var panes = $scope.panes = []; $scope.select = function(pane) { ...
22
votes
2answers
9k views

How does the $resource `get` function work synchronously in AngularJS?

I was watching this AngularJS tutorial describing how to hook into Twitter with an Angular resource. (Video tutorial) Here is the resource that is set up in the example controller: $scope.twitter = ...
21
votes
4answers
11k views

How to set focus in AngularJS?

What is the 'Angular way' to set focus on input field in AngularJS? More specific requirements: When a Modal is opened, set focus on a predefined <input> inside this Modal. Everytime ...
54
votes
3answers
18k views

confused about service vs factory

As I understand it, when inside a factory I return a object that gets injected into a controller. When inside a service I am dealing with the object using this and not returning anything. I was ...

15 30 50 per page