|
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 | 30 | - What is $scope in AngularJS?
|
| 31 | + - What is difference between $scope and scope? |
| 32 | + - How would you validate a text input field for a twitter username, including the @ symbol? |
| 33 | + - How do you hide an HTML element via a button click in AngularJS? |
| 34 | + - How would you react on model changes to trigger some further action? For instance, say you have an input text field called email and you want to trigger or execute some code as soon as a user starts to type in their email? |
| 35 | + - How do you disable a button depending on a checkbox’s state? |
31 | 36 |
|
32 | 37 |
|
33 | 38 | ### 2. Architecture
|
|
48 | 53 | - What is a digest cycle in AngularJS?
|
49 | 54 | - Explain how $scope.$apply() works?
|
50 | 55 | - What makes the angular.copy() method so powerful?
|
| 56 | + - What is a singleton pattern and where we can find it in AngularJS? |
51 | 57 |
|
52 | 58 |
|
53 | 59 | ### 3. Directives
|
|
62 | 68 | - 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?
|
63 | 69 | - When should you use an attribute Vs an element?
|
64 | 70 | - What is the role of ng-app, ng-init and ng-model directives?
|
65 |
| - |
| 71 | + - How would you programatically change or adapt the template of a directive before it is executed and transformed? |
66 | 72 |
|
67 | 73 |
|
68 | 74 | ### 4. Filters
|
|
75 | 81 | - How do you share data between controllers?
|
76 | 82 | - How would you make an Angular service return a promise? Write a code snippet as an example?
|
77 | 83 | - What is the role of services in AngularJS and name any services made available by default?
|
| 84 | + - What is an interceptor? |
| 85 | + - What are common uses of an interceptor in AngularJS? |
| 86 | + - How would you implement application-wide exception handling in your Angular app? |
| 87 | + - In angular, what does the calls to the HTTP methods return? |
78 | 88 |
|
79 | 89 |
|
80 | 90 | ### 6. Performance
|
@@ -856,14 +866,9 @@ We can use the ng-disabled directive and bind its condition to the checkbox’s
|
856 | 866 | <button ng-disabled="checked">Select me</button>
|
857 | 867 | </body>
|
858 | 868 | ```
|
859 |
| -#### Q. ***In angular, what does the calls to the HTTP methods return ?*** |
860 |
| -
|
| 869 | +#### Q. ***In angular, what does the calls to the HTTP methods return?*** |
861 | 870 | In angular, calls to the HTTP methods actually return an observable and not a promise. You can think of an observable as a stream of events, and meeting values to anyone who has subscribed to it.
|
862 | 871 |
|
863 |
| -#### Q. ***AngularJS comandline to generate e component from the terminal?*** |
864 |
| -In Angular we can generate component from the terminal by ngFor generater. If I want to create contact componenet, I would just run `ng generate component contact` and it will create all the necesory file for me and just update that to use it! |
865 |
| -
|
866 |
| -
|
867 | 872 | #### Q. ***An operator that we can use to avoid any 404 error is?***
|
868 | 873 | In Angular we can use `?` to avoid any unecessory file not found response. Let say if we have a cantacts information and we did not give a photo url but if we write `[src]=contact?.photoUrl` it will say 404 even if photo was not added.
|
869 | 874 |
|
|
0 commit comments