Expert level Angular Interview Questions Part -1

Components

  1. How is changing the CD strategy to onPush impact component?
  2. How to make child component data two way data binding?
  3. What is the dynamic component?
  4. What is an angular element?
  5. What is a component factory resolver?
  6. 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. Explain Styling precedence ?
  2. Difference between @Attribute() vs @Input()?
  3. How to use svg file as templates?
  4. Template type checking in custom directive?
  5. Describe 3 Mode of template type checking?
  6. Enlight the ngAfterContentChecked and ngAfterViewChecked?
  7. Write code for custom pipe for change the string to title case? How impure pipe impact angular.
  8. How pipe change detection works for primitive and references objects ?
  9. What is use of Async pipe ?
  10. Which have higher precedence between pipe and ternary operator ?
  11. 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. What is template input variable?
  2. Which Module need to import for using built in directives?
  3. Is angular selector support parent child relationship ?
  4. Explain Hostbinding, Hostlistener?
  5. Explain ContentChildren and ViewChild ?
  6. Write the syntax for ngClass use cases?
  7. Tell the use case of ngModel Change ?
  8. Explain the use of trackby?
  9. How to host a directive without Dom?
  10. What is ElementRef use?
  11. How to stop/Deactivate the processing of directive or binding ?
  12. How to create template fragments ?
  13. What is template guard?

Dependency Injection

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

Routing & Navigation

  1. What is the difference between canLoad and canActivate?
  2. What is a router event ? name the any of ?
  3. Differentiate the param and query param in lazyloading?
  4. How to redirect any path ?
  5. What does pathMatch signifies ?
  6. What are auxiliary routes?
  7. What is canResolve route guard?
  8. 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?
  9. Explain the properties of the activated route?
  10. How to use a scroll event in navigation?
  11. Name the navigation event trigger when loading lazyload routes?

Forms

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ACHARYA ANIL SURYAVANSHI

ACHARYA ANIL SURYAVANSHI

Software Engineer | Bharat Swabhiman Patanjali Social Activist | Speaker | Motivator | Yoga Trainer