Tag: c

61 votes
10 answers
1.5K views
AngularJS : Initialize service with asynchronous data

I have an AngularJS service that I want to initialize with some asynchronous data. Something like this: myMod

avatar
Omar
0 1 0 9
asked 07 September, 2021
57 votes
6 answers
2.7K views
Complex nesting of partials and templates

My question involves how to go about dealing with complex nesting of templates (also called partials) in an An

avatar
Arline
0 1 0 9
asked 07 September, 2021
60 votes
11 answers
1.8K views
AngularJS ngClass conditional

Is there any way to make an expression for something like ng-class to be a conditional? For example, I have t

avatar
Keith
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
64 votes
10 answers
3K views
What is the difference between Polymer elements and AngularJS directives?

On the Polymer Getting Started page, we see an example of Polymer in action: <html> <head>

avatar
Roger
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
58 votes
27 answers
434 views
How do I set the value property in AngularJS&apos; 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
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
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
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
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