AngularJS Interview Questions and Answers
AngularJS (1.x) interview questions — two-way binding and the digest cycle, scope, directives, controllers vs services, and dependency injection.
10Questions
5Topics
Basic to AdvancedDifficulty
1–2 Yrs to 5+ YrsExperience
- 01 What is two-way data binding and the digest cycle in AngularJS? Two-way binding keeps the view and the model in sync: ng-model updates the scope when the user types, and the scope…
- 02 What is a directive in AngularJS? A directive is a reusable marker on an element or attribute that tells AngularJS to attach behaviour or transform the…
- 03 What is the difference between a service, a factory and a provider in AngularJS? All three register an injectable singleton; they differ in how you define it. factory — a function that returns the…
- 04 What is $scope in AngularJS, and how does scope inheritance work? $scope is the object that glues a controller to its view — properties on it are available in the template and are…
- 05 How does dependency injection work in AngularJS? AngularJS injects services by matching the parameter name to a registered provider — function(\$http, myService) {}.…
- 06 What is the difference between ng-if, ng-show and ng-hide in AngularJS? ng-if adds or removes the element from the DOM entirely (and creates/destroys a child scope and its watchers).…
- 07 What are $watch, $digest and $apply in AngularJS? $watch(expr, fn) registers a listener that fires during a digest when expr's value changes. $digest runs the…
- 08 What is the difference between AngularJS and Angular (2+)? AngularJS (1.x) and Angular (2+) are different frameworks that share a name. Angular is a complete rewrite:…
- 09 What is transclusion in AngularJS? Transclusion is a directive taking the original content between its tags and inserting it somewhere in the directive's…
- 10 Why does an AngularJS app get slow, and how do you fix it? Every digest cycle re-evaluates every watcher on the page, and it loops until stable. With thousands of bindings (big…
No questions match those filters
Try removing a filter or .
About these AngularJS questions
AngularJS 1.x is legacy but far from gone in enterprise .NET frontends. Interviews focus on the digest cycle and dirty checking (and why it can get slow), $scope and prototypal inheritance, the different kinds of directives, and how AngularJS dependency injection works by parameter name.