|
1 |
| -## AngularJS ( v1.7.x ) Interview Questions with Example |
| 1 | +## AngularJS Interview Questions with Example ( Updated upto v1.7.x ) |
2 | 2 |
|
3 | 3 |
|
4 | 4 | ### 1. Basics
|
|
44 | 44 |
|
45 | 45 | |Sl.No| Questions |
|
46 | 46 | |-----|-----------------------------------------------------------------------|
|
47 |
| -| 01. |[What are the differences between `Provider` vs `Factory` vs `Service`?](#q-what-are-the-differences-between-provider-vs-factory-vs-service-)| |
48 |
| -| 02. |[How do you prefer to develop the data access layer which communicate with REST service?](#q-how-do-you-prefer-to-develop-the-data-access-layer-which-communicate-with-rest-service)| |
49 |
| -| 03. |[Which service do you use: `$http` or `$resourse` or `rest-angular`?](#q-which-service-do-you-use-http-or-resourse-or-rest-angular-)| |
50 |
| -| 04. |[How can you configure `$http` service?](#q-how-can-you-configure-http-service)| |
51 |
| -| 05. |[What about `q` and promises in angularjs?](#q-what-about-q-and-promises-in-angularjs)| |
52 |
| -| 06. |[Explain Event model in angularjs?](#q-explain-event-model-in-angularjs)| |
53 |
| -| 07. |[Do you use some sort of angular style guides?](#q-do-you-use-some-sort-of-angular-style-guides)| |
54 |
| -| 08. |[What is dependency injection? Explain difference between inline and explicit annotation?](#q-what-is-dependency-injection-explain-difference-between-inline-and-explicit-annotation)| |
55 |
| -| 09. |[What is auto bootstrap process in AngularJS?](#q-what-is-auto-bootstrap-process-in-angularjs)| |
56 |
| -| 10. |[What is manual bootstrap process in AngularJS?](#q-what-is-manual-bootstrap-process-in-angularjs)| |
57 |
| -| 11. |[How AngularJS is compiled?](#q-how-angularjs-is-compiled)| |
58 |
| -| 12. |[What should be the maximum number of concurrent "watches"? How would you keep an eye on that number?](#q-what-should-be-the-maximum-number-of-concurrent-watches-how-would-you-keep-an-eye-on-that-number)| |
59 |
| -| 13. |[Where should we implement the DOM manipulation in AngularJS?](#q-where-should-we-implement-the-dom-manipulation-in-angularjs)| |
60 |
| -| 14. |[How `$digest` works?](#q-how-digest-works)| |
61 |
| -| 15. |[What is a digest cycle in AngularJS?](#q-what-is-a-digest-cycle-in-angularjs)| |
62 |
| -| 16. |[Explain how $scope.$apply() works?](#q-explain-how-scope-apply-works)| |
63 |
| -| 17. |[What makes the angular.copy() method so powerful?](#q-what-makes-the-angularcopy-method-so-powerful)| |
64 |
| -| 18. |[What is a singleton pattern and where we can find it in AngularJS?](#q-what-is-a-singleton-pattern-and-where-we-can-find-it-in-angularjs)| |
65 |
| - |
| 47 | +| 33. |[What are the differences between `Provider` vs `Factory` vs `Service`?](#q-what-are-the-differences-between-provider-vs-factory-vs-service-)| |
| 48 | +| 34. |[How do you prefer to develop the data access layer which communicate with REST service?](#q-how-do-you-prefer-to-develop-the-data-access-layer-which-communicate-with-rest-service)| |
| 49 | +| 35. |[Which service do you use: `$http` or `$resourse` or `rest-angular`?](#q-which-service-do-you-use-http-or-resourse-or-rest-angular-)| |
| 50 | +| 36. |[How can you configure `$http` service?](#q-how-can-you-configure-http-service)| |
| 51 | +| 37. |[What about `q` and promises in angularjs?](#q-what-about-q-and-promises-in-angularjs)| |
| 52 | +| 38. |[Explain Event model in angularjs?](#q-explain-event-model-in-angularjs)| |
| 53 | +| 39. |[Do you use some sort of angular style guides?](#q-do-you-use-some-sort-of-angular-style-guides)| |
| 54 | +| 40. |[What is dependency injection? Explain difference between inline and explicit annotation?](#q-what-is-dependency-injection-explain-difference-between-inline-and-explicit-annotation)| |
| 55 | +| 41. |[What is auto bootstrap process in AngularJS?](#q-what-is-auto-bootstrap-process-in-angularjs)| |
| 56 | +| 42. |[What is manual bootstrap process in AngularJS?](#q-what-is-manual-bootstrap-process-in-angularjs)| |
| 57 | +| 43. |[How AngularJS is compiled?](#q-how-angularjs-is-compiled)| |
| 58 | +| 44. |[What should be the maximum number of concurrent "watches"? How would you keep an eye on that number?](#q-what-should-be-the-maximum-number-of-concurrent-watches-how-would-you-keep-an-eye-on-that-number)| |
| 59 | +| 45. |[Where should we implement the DOM manipulation in AngularJS?](#q-where-should-we-implement-the-dom-manipulation-in-angularjs)| |
| 60 | +| 46. |[How `$digest` works?](#q-how-digest-works)| |
| 61 | +| 47. |[What is a digest cycle in AngularJS?](#q-what-is-a-digest-cycle-in-angularjs)| |
| 62 | +| 48. |[Explain how $scope.$apply() works?](#q-explain-how-scope-apply-works)| |
| 63 | +| 49. |[What makes the angular.copy() method so powerful?](#q-what-makes-the-angularcopy-method-so-powerful)| |
| 64 | +| 50. |[What is a singleton pattern and where we can find it in AngularJS?](#q-what-is-a-singleton-pattern-and-where-we-can-find-it-in-angularjs)| |
66 | 65 |
|
67 | 66 | ### 3. Directives
|
68 | 67 |
|
69 | 68 | |Sl.No| Questions |
|
70 | 69 | |-----|------------------------------------------------------------------------|
|
71 |
| -| 01. |[What are directives in angularjs?](#q-what-are-directives-in-angularjs)| |
72 |
| -| 02. |[List some built-in directives](#q-list-some-built-in-directives) |
73 |
| -| 03. |[Explain difference between 'compile' and 'link' callbacks in directive definition](#q-explain-difference-between-compile-and-link-callbacks-in-directive-definition) |
74 |
| -| 04. |[List types of scopes directive can have?](#q-list-types-of-scopes-directive-can-have)| |
75 |
| -| 05. |[How Directives are compiled?](#q-how-directives-are-compiled)| |
76 |
| -| 06. |[What are the directives in angularJS?](#q-what-are-the-directives-in-angularjs)| |
77 |
| -| 07. |[What are different ways to invoke a directive?](#q-what-are-different-ways-to-invoke-a-directive)| |
78 |
| -| 08. |[What is the difference between ng-show/ng-hide and ng-if directives?](#q-what-is-the-difference-between-ng-show-ng-hide-and-ng-if-directives)| |
79 |
| -| 09. |[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?](#q-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)| |
80 |
| -| 10. |[When should you use an attribute Vs an element?](#q-when-should-you-use-an-attribute-vs-an-element)| |
81 |
| -| 11. |[What is the role of ng-app, ng-init and ng-model directives?](#q-what-is-the-role-of-ng-app-ng-init-and-ng-model-directives)| |
82 |
| -| 12. |[How would you programatically change or adapt the template of a directive before it is executed and transformed?](#q-how-would-you-programatically-change-or-adapt-the-template-of-a-directive-before-it-is-executed-and-transformed)| |
83 |
| -| 13. |[What is the Router directive that can be placed on elements to navigate to a new route?](#q-what-is-the-router-directive-that-can-be-placed-on-elements-to-navigate-to-a-new-route)| |
| 70 | +| 51. |[What are directives in angularjs?](#q-what-are-directives-in-angularjs)| |
| 71 | +| 52. |[List some built-in directives](#q-list-some-built-in-directives) |
| 72 | +| 53. |[Explain difference between 'compile' and 'link' callbacks in directive definition](#q-explain-difference-between-compile-and-link-callbacks-in-directive-definition) |
| 73 | +| 54. |[List types of scopes directive can have?](#q-list-types-of-scopes-directive-can-have)| |
| 74 | +| 55. |[How Directives are compiled?](#q-how-directives-are-compiled)| |
| 75 | +| 56. |[What are the directives in angularJS?](#q-what-are-the-directives-in-angularjs)| |
| 76 | +| 57. |[What are different ways to invoke a directive?](#q-what-are-different-ways-to-invoke-a-directive)| |
| 77 | +| 58. |[What is the difference between ng-show/ng-hide and ng-if directives?](#q-what-is-the-difference-between-ng-show-ng-hide-and-ng-if-directives)| |
| 78 | +| 59. |[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?](#q-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)| |
| 79 | +| 60. |[When should you use an attribute Vs an element?](#q-when-should-you-use-an-attribute-vs-an-element)| |
| 80 | +| 61. |[What is the role of ng-app, ng-init and ng-model directives?](#q-what-is-the-role-of-ng-app-ng-init-and-ng-model-directives)| |
| 81 | +| 62. |[How would you programatically change or adapt the template of a directive before it is executed and transformed?](#q-how-would-you-programatically-change-or-adapt-the-template-of-a-directive-before-it-is-executed-and-transformed)| |
| 82 | +| 63. |[What is the Router directive that can be placed on elements to navigate to a new route?](#q-what-is-the-router-directive-that-can-be-placed-on-elements-to-navigate-to-a-new-route)| |
84 | 83 |
|
85 | 84 |
|
86 | 85 | ### 4. Filters
|
87 | 86 |
|
88 | 87 | |Sl.No| Questions |
|
89 | 88 | |-----|------------------------------------------------------------------|
|
90 |
| -| 01. |[What are Filters in AngularJS?](#q-what-are-filters-in-angularjs)| |
91 |
| -| 02. |[What are the basics steps to unit test an AngulatJS filter?](#q-what-are-the-basics-steps-to-unit-test-an-angulatjs-filter)| |
| 89 | +| 64. |[What are Filters in AngularJS?](#q-what-are-filters-in-angularjs)| |
| 90 | +| 65. |[What are the basics steps to unit test an AngulatJS filter?](#q-what-are-the-basics-steps-to-unit-test-an-angulatjs-filter)| |
92 | 91 |
|
93 | 92 |
|
94 | 93 | ### 5. Service
|
95 | 94 |
|
96 | 95 | |Sl.No| Questions |
|
97 | 96 | |-----|------------------------------------------------------------------------------------------------------|
|
98 |
| -| 01. |[What is difference between services and factory?](#q-what-is-difference-between-services-and-factory)| |
99 |
| -| 02. |[How do you share data between controllers?](#q-how-do-you-share-data-between-controllers)| |
100 |
| -| 03. |[How would you make an Angular service return a promise? Write a code snippet as an example?](#q-how-would-you-make-an-angular-service-return-a-promise--write-a-code-snippet-as-an-example)| |
101 |
| -| 04. |[What is the role of services in AngularJS and name any services made available by default?](#q-what-is-the-role-of-services-in-angularjs-and-name-any-services-made-available-by-default)| |
102 |
| -| 05. |[What is an interceptor?](#q-what-is-an-interceptor)| |
103 |
| -| 06. |[What are common uses of an interceptor in AngularJS?](#q-what-are-common-uses-of-an-interceptor-in-angularjs)| |
104 |
| -| 07. |[How would you implement application-wide exception handling in your Angular app?](#q-how-would-you-implement-application-wide-exception-handling-in-your-angular-app)| |
105 |
| -| 08. |[In angular, what does the calls to the HTTP methods return?](#q-in-angular--what-does-the-calls-to-the-http-methods-return)| |
106 |
| -| 09. |[Using the Angular Http module to make a request, which method is used to listen for an emitted response?](#q-using-the-angular-http-module-to-make-a-request--which-method-is-used-to-listen-for-an-emitted-response)| |
107 |
| -| 10. |[An Angular class that used to create an instance that will be an argument to the request method of http is?](#q-an-angular-class-that-used-to-create-an-instance-that-will-be-an-argument-to-the-request-method-of-http-is)| |
| 97 | +| 66. |[What is difference between services and factory?](#q-what-is-difference-between-services-and-factory)| |
| 98 | +| 67. |[How do you share data between controllers?](#q-how-do-you-share-data-between-controllers)| |
| 99 | +| 68. |[How would you make an Angular service return a promise? Write a code snippet as an example?](#q-how-would-you-make-an-angular-service-return-a-promise--write-a-code-snippet-as-an-example)| |
| 100 | +| 69. |[What is the role of services in AngularJS and name any services made available by default?](#q-what-is-the-role-of-services-in-angularjs-and-name-any-services-made-available-by-default)| |
| 101 | +| 70. |[What is an interceptor?](#q-what-is-an-interceptor)| |
| 102 | +| 71. |[What are common uses of an interceptor in AngularJS?](#q-what-are-common-uses-of-an-interceptor-in-angularjs)| |
| 103 | +| 72. |[How would you implement application-wide exception handling in your Angular app?](#q-how-would-you-implement-application-wide-exception-handling-in-your-angular-app)| |
| 104 | +| 73. |[In angular, what does the calls to the HTTP methods return?](#q-in-angular--what-does-the-calls-to-the-http-methods-return)| |
| 105 | +| 74. |[Using the Angular Http module to make a request, which method is used to listen for an emitted response?](#q-using-the-angular-http-module-to-make-a-request--which-method-is-used-to-listen-for-an-emitted-response)| |
| 106 | +| 75. |[An Angular class that used to create an instance that will be an argument to the request method of http is?](#q-an-angular-class-that-used-to-create-an-instance-that-will-be-an-argument-to-the-request-method-of-http-is)| |
108 | 107 |
|
109 | 108 |
|
110 | 109 | ### 6. Miscellaneous
|
111 | 110 |
|
112 | 111 | |Sl.No| Questions |
|
113 | 112 | |-----|-------------------------------------------------------------------------------------------------------------|
|
114 |
| -| 01. |[What is the best practice to build your application](#q-what-is-the-best-practice-to-build-your-application)| |
115 |
| -| 02. |[When it is necessary or whether it is necessary to use `$scope.$apply`](#q-when-it-is-necessary-or-whether-it-is-necessary-to-use---scope-apply)| |
116 |
| -| 03. |[A JSON Web Token consists of?](#q-a-json-web-token-consists-of)| |
117 |
| -| 04. |[A JWT should be signed with a secret called?](#q-a-jwt-should-be-signed-with-a-secret-called)| |
118 |
| -| 05. |[Having the JWT token, what is the format of the Authorization header looks like?](#q-having-the-jwt-token--what-is-the-format-of-the-authorization-header-looks-like)| |
| 113 | +| 76. |[What is the best practice to build your application](#q-what-is-the-best-practice-to-build-your-application)| |
| 114 | +| 77. |[When it is necessary or whether it is necessary to use `$scope.$apply`](#q-when-it-is-necessary-or-whether-it-is-necessary-to-use---scope-apply)| |
| 115 | +| 78. |[A JSON Web Token consists of?](#q-a-json-web-token-consists-of)| |
| 116 | +| 79. |[A JWT should be signed with a secret called?](#q-a-jwt-should-be-signed-with-a-secret-called)| |
| 117 | +| 80. |[Having the JWT token, what is the format of the Authorization header looks like?](#q-having-the-jwt-token--what-is-the-format-of-the-authorization-header-looks-like)| |
119 | 118 |
|
120 | 119 | <br/>
|
121 | 120 |
|
|
0 commit comments