Tagged Questions
1281
votes
5answers
127k 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 ...
363
votes
5answers
71k 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 ...
89
votes
9answers
30k 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 ...
27
votes
3answers
15k 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 ...
26
votes
6answers
20k 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 ...
54
votes
4answers
16k 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)
...
62
votes
7answers
30k 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 ...
23
votes
2answers
10k 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 = ...
12
votes
3answers
16k 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" ...
88
votes
10answers
23k 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?
32
votes
5answers
10k 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 ...
23
votes
2answers
9k 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 ...
12
votes
4answers
17k 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:
...
40
votes
5answers
15k views
A ternary in angular templates ( angularjs )
How do you do a ternary with angularjs (in the templates)?
It would be nice to use some in html attributes (classes and style) instead of creating and calling a function of the controller.
16
votes
5answers
18k views
AngularJS - Any way for $http.post to send request parameters instead of JSON?
I have some old code that is making an AJAX POST request through jQuery's post method and looks something like this:
$.post("/foo/bar", requestData,
function(responseData)
{
//do ...