Tag: angular

58 votes
27 answers
434 views
How do I set the value property in AngularJS' ng-options?

Here is what seems to be bothering a lot of people (including me). When using the ng-options directive in Ang

avatar
Gigi
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
59 votes
14 answers
3K views
Can one AngularJS controller call another?

Is it possible to have one controller use another? For example: This HTML document simply prints a message d

avatar
Hallie
0 1 0 9
asked 07 September, 2021
61 votes
7 answers
1.7K views
AngularJS passing data to $http.get request

I have a function which does a http POST request. The code is specified below. This works fine. $http({ u

avatar
Robt
0 1 0 9
asked 07 September, 2021
56 votes
20 answers
429 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
53 votes
29 answers
436 views
How do I bind to list of checkbox values with AngularJS?

I have a few checkboxes: <input type='checkbox' value="apple" checked> <input type='c

avatar
Dwain
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
59 votes
15 answers
1.5K views
How do search engines deal with AngularJS applications?

I see two issues with AngularJS application regarding search engines and SEO: 1) What happens with custom tag

avatar
Chelsea
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
56 votes
17 answers
710 views
Insert HTML into view from AngularJS controller

Is it possible to create an HTML fragment in an AngularJS controller and have this HTML shown in the view? Th

avatar
Keith
0 1 0 9
asked 07 September, 2021
55 votes
28 answers
2.2K views
AngularJS : Prevent error $digest already in progress when calling $scope.$apply()

I'm finding that I need to update my page to my scope manually more and more since building an applicatio

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
57 votes
12 answers
2.6K views
Working with $scope.$emit and $scope.$on

How can I send my $scope object from one controller to another using .$emit and .$on methods? function firstC

avatar
Don
0 1 0 9
asked 07 September, 2021
48 votes
3 answers
1K 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 pa

avatar
Benton
0 1 0 9
asked 07 September, 2021
56 votes
7 answers
1.9K views
&apos;this&apos; vs $scope in AngularJS controllers

In the "Create Components" section of AngularJS's homepage, there is this example: controller: function(

avatar
Suzan
0 1 0 9
asked 07 September, 2021
63 votes
9 answers
1.6K views
angular.service vs angular.factory

I have seen both angular.factory() and angular.service() used to declare services; however, I cannot find angu

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
53 votes
18 answers
3.1K views
What is the difference between &apos;@&apos; and &apos;=&apos; in directive scope in AngularJS?

I've read the AngularJS documentation on the topic carefully, and then fiddled around with a directive. H

avatar
Luis
0 1 0 9
asked 07 September, 2021
60 votes
15 answers
1.4K views
What is the difference between angular-route and angular-ui-router?

I'm planning to use AngularJS in my big applications. So I'm in the process to find out the right mo

avatar
Cortez
0 1 0 9
asked 07 September, 2021