AngularJS

Use for questions about AngularJS (1.x), the open-source JavaScript framework. Do NOT use this tag for Angular 2 or later versions; instead, use the [angular] tag.

60 votes
12 answers
1.1K views
How can I tell whether a web app was built using Angular (or other technologies)?

How can I tell whether a (Drupal 7) web app was built using Angular by looking at the page source, and not hav

avatar
Arline
0 1 0 9
asked 07 September, 2021
62 votes
12 answers
1K views
$apply already in progress error

Stack trace: Error: $apply already in progress at Error (<anonymous>) at beginPhase (file:///android_as

avatar
Patsy
0 1 0 9
asked 07 September, 2021
54 votes
19 answers
2.1K views
How to use a keypress event in AngularJS?

I want to catch the enter key press event on the textbox below. To make it more clear I am using a ng-repeat t

avatar
Rudy
0 1 0 9
asked 07 September, 2021
56 votes
21 answers
498 views
AngularJS : How to watch service variables?

I have a service, say: factory('aService', ['$rootScope', '$resource', function

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
60 votes
12 answers
2.8K views
What is the difference between ng-if and ng-show/ng-hide

I'm trying to understand the difference between ng-if and ng-show/ng-hide, but they look the same to me.

avatar
Yolando
0 1 0 9
asked 07 September, 2021
60 votes
19 answers
2.5K views
What&apos;s the correct way to communicate between controllers in AngularJS?

What's the correct way to communicate between controllers? I'm currently using a horrible fudge inv

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
61 votes
10 answers
1.8K views
Angular ng-repeat Error "Duplicates in a repeater are not allowed."

I am defining a custom filter like so: <div class="idea item" ng-repeat="item in items" isoatom>

avatar
Rudy
0 1 0 9
asked 07 September, 2021
51 votes
12 answers
457 views
ng-repeat :filter by single field

I have an array of products that I'm repeating over using ng-repeat and am using <div ng-repeat="pro

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
66 votes
11 answers
2.1K views
Redirecting to a certain route based on condition

I'm writing a small AngularJS app that has a login view and a main view, configured like so: $routeProvi

avatar
Solomon
0 1 0 9
asked 07 September, 2021
52 votes
7 answers
2.2K views
When to favor ng-if vs. ng-show/ng-hide?

I understand that ng-show and ng-hide affect the class set on an element and that ng-if controls whether an el

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
67 votes
6 answers
3K views
Link vs compile vs controller

When you create a directive, you can put code into the compiler, the link function or the controller. In the

avatar
Elicia
0 1 0 9
asked 07 September, 2021
57 votes
24 answers
3K views
Combating AngularJS executing controller twice

I understand AngularJS runs through some code twice, sometimes even more, like $watch events, constantly check

avatar
Sachiko
0 1 0 9
asked 07 September, 2021
62 votes
8 answers
1.4K views
What&apos;s the difference between ng-model and ng-bind

I'm currently learning AngularJS and am having difficulty understanding the difference between ng-bind an

avatar
Jeff
0 1 0 9
asked 07 September, 2021
53 votes
11 answers
2.8K views
Adding multiple class using ng-class

Can we have multiple expression to add multiple ng-class ? for eg. <div ng-class="{class1: expressionData

avatar
Don
0 1 0 9
asked 07 September, 2021
56 votes
20 answers
431 views
Confused about Service vs Factory

As I understand it, when inside a factory I return an object that gets injected into a controller. When inside

avatar
Yolando
0 1 0 9
asked 07 September, 2021
63 votes
15 answers
2.3K views
How to use a filter in a controller?

I have written a filter function which will return data based on the argument you are passing. I want the same

avatar
Royal
0 1 0 9
asked 07 September, 2021
59 votes
26 answers
3.1K views
Why does AngularJS include an empty option in select?

I've been working with AngularJS for the last few weeks, and the one thing which is really bothering me i

avatar
Sena
0 1 0 9
asked 07 September, 2021
60 votes
9 answers
3K views
How to iterate over the keys and values with ng-repeat in AngularJS?

In my controller, I have data like: $scope.object = data Now this data is the dictionary with keys and values

avatar
Keila
0 1 0 9
asked 07 September, 2021
56 votes
10 answers
2.2K views
if else statement in AngularJS templates

I want to do a condition in an AngularJS template. I fetch a video list from the Youtube API. Some of the vide

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
1.6K views
How to set focus on input field?

What is the 'Angular way' to set focus on input field in AngularJS? More specific requirements: Wh

avatar
Jefferey
0 1 0 9
asked 07 September, 2021