ACHARYA ANIL SURYAVANSHI

Mar 26, 2021

3 min read

Expert level Angular Interview Questions Part -1

My self in Fallachan Valley

Components

  1. How to make child component data two way data binding?
  2. What is the dynamic component?
  3. What is an angular element?
  4. What is a component factory resolver?
  5. In Parent to child component communication. Suppose an object have two properties only change in one property in parent, Will change reflect in the child component?

Like : — Employee = { name : ‘Anil’ , department:’Engineering’}

Templates

  1. Difference between @Attribute() vs @Input()?
  2. How to use svg file as templates?
  3. Template type checking in custom directive?
  4. Describe 3 Mode of template type checking?
  5. Enlight the ngAfterContentChecked and ngAfterViewChecked?
  6. Write code for custom pipe for change the string to title case? How impure pipe impact angular.
  7. How pipe change detection works for primitive and references objects ?
  8. What is use of Async pipe ?
  9. Which have higher precedence between pipe and ternary operator ?
  10. What is innerHtml? If we bind a string like

Title = ‘Template <script>alert(“evil never sleeps”)</script> Syntax’;

<p><span>”{{Title}}” title.</span></p>

will it bind?

12. How to made custom two way binding like ngModel?

13 . What happens if assign template local reference variable on ng-template?

Directives

  1. Which Module need to import for using built in directives?
  2. Is angular selector support parent child relationship ?
  3. Explain Hostbinding, Hostlistener?
  4. Explain ContentChildren and ViewChild ?
  5. Write the syntax for ngClass use cases?
  6. Tell the use case of ngModel Change ?
  7. Explain the use of trackby?
  8. How to host a directive without Dom?
  9. What is ElementRef use?
  10. How to stop/Deactivate the processing of directive or binding ?
  11. How to create template fragments ?
  12. What is template guard?

Dependency Injection

  1. How to provide an alternative Class provider?
  2. What is a factory provider?
  3. What is a parameter decorator?
  4. Making dependency option and search with a host?
  5. How to alias class interface?
  6. How to inject an object? syntax also?
  7. What is the use of @Inject or How to supply a custom provider?

Routing & Navigation

  1. What is a router event ? name the any of ?
  2. Differentiate the param and query param in lazyloading?
  3. How to redirect any path ?
  4. What does pathMatch signifies ?
  5. What are auxiliary routes?
  6. What is canResolve route guard?
  7. What is the location strategy? Please enlighten the type also? Or There are two kind of Url one with hash one without hash compare both?
  8. Explain the properties of the activated route?
  9. How to use a scroll event in navigation?
  10. Name the navigation event trigger when loading lazyload routes?

Forms

  1. In Which form of approach data model is immutable?
  2. How does data flow differently in template and reactive forms?
  3. What is benefit of ngForm Driective ?
  4. Differentiate the pristine dirty touched ?
  5. How to put custom validation in template driven forms?
  6. What is use of remove Control ?
  7. How to use Update Model?
  8. How to show validation errors in dynamic template driven form and reactive forms ?
  9. Write code for custom validation for reactive forms ?
  10. What is cross field validation?
  11. Implement async validator for template driven form?
  12. How to compose dynamic form content?