|
27 | 27 | - How would you specify that a scope variable should have one-time binding only?
|
28 | 28 | - What directive would you use to hide elements from the HTML DOM by removing them from that DOM not changing their styling?
|
29 | 29 | - How do you reset a $timeout, $interval(), and disable a $watch()?
|
| 30 | + - What is $scope in AngularJS? |
30 | 31 |
|
31 | 32 |
|
32 | 33 | ### 2. Architecture
|
|
50 | 51 |
|
51 | 52 |
|
52 | 53 | ### 3. Directives
|
53 |
| - - What is directive in angularjs? |
| 54 | + - What are directives in angularjs? |
54 | 55 | - List some built-in directives
|
55 | 56 | - Explain difference between 'compile' and 'link' callbacks in directive definition
|
56 | 57 | - List types of scopes directive can have?
|
|
60 | 61 | - What is the difference between ng-show/ng-hide and ng-if directives?
|
61 | 62 | - When creating a directive, it can be used in several different ways in the view. Which ways for using a directive do you know? How do you define the way your directive will be used?
|
62 | 63 | - When should you use an attribute Vs an element?
|
| 64 | + - What is the role of ng-app, ng-init and ng-model directives? |
| 65 | + |
63 | 66 |
|
64 | 67 |
|
65 | 68 | ### 4. Filters
|
@@ -518,11 +521,6 @@ AngularJS directives are a combination of AngularJS template markups (HTML attri
|
518 | 521 | CSS classes) and supporting JavaScript code.The JavaScript directive code defines the template data and
|
519 | 522 | behaviors of the HTML elements.
|
520 | 523 |
|
521 |
| -#### Q. ***What are different ways to invoke a directive?*** |
522 |
| -Attribute ('A') <span my-directive></span> |
523 |
| -Class('C') <span class="my-directive: expression;"></span> |
524 |
| -Element ('E') <my-directive></my-directive> |
525 |
| -Comment ('M') <!-- directive: my-directive expression --> |
526 | 524 |
|
527 | 525 | #### Q. ***What is difference between $scope and scope?***
|
528 | 526 | $scope - In case of DI, you inject the scope object with the dollar prefix i.e. $scope. The reason is
|
|
0 commit comments