1455
votes
6answers
145k 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 ...
395
votes
5answers
79k 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 ...
102
votes
9answers
35k 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 ...
30
votes
6answers
24k 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 ...
67
votes
7answers
34k 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 ...
31
votes
2answers
18k 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 ...
58
votes
4answers
17k 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) ...
24
votes
2answers
11k 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 = ...
15
votes
3answers
18k views

AngularJS - Value attribute on an input text box is ignored when there is a ng-model used?

Using AngularJS if I set a simple input text box value to something like "bob" below. The value does not display if the ng-model attribute is added. <input type="text" id="rootFolder" ...
96
votes
10answers
25k views

AngularJS with Django - Conflicting template tags

I want to use AngularJS with Django however they both use {{ }} as their template tags. Is there an easy way to change one of the two to use some other custom templating tag?
35
votes
7answers
12k views

How to handle anchor hash linking in AngularJS

Do any of you know how to nicely handle anchor hash linking in AngularJS? I have the following markup for a simple FAQ-page <a href="#faq-1">Question 1</a> <a ...
5
votes
6answers
6k views

using setInterval in angularjs factory

I was trying the code given in angularjs docs (given here: http://jsfiddle.net/zGqB8/) It just implements a time factory and uses $timeout to update the time object after each second. ...
25
votes
2answers
10k views

How to do two-way filtering in angular.js?

One of the interesting things Angular.js can do is apply a filter to a particular databinding expression, which is a convenient way to apply, for example, culture-specific currency or date formatting ...
56
votes
2answers
32k views

Insert HTML into view using AngularJS

Is it possible to create an HTML fragment in an Angular controller and have this HTML shown in the view? This comes from a requirement to turn an inconsistent JSON blob into a nested list of id : ...
12
votes
4answers
19k views

AngularJS - How to use $routeParams in generating the templateUrl?

Our application has 2-level navigating. We want to use AngularJS $routeProvider to dynamically provide templates to an <ng-view />. I was thinking of doing something along the lines of this: ...

15 30 50 per page