At this level an interviewer wants to know whether the interviewee is a coachable self-learner. Hence, he/she might ask questions about basic terminology, your ability to build a simple app, and your comprehension of basic concepts.
- What are the differences between AngularJS (angular 1.x) and Angular (Angular 2.x and beyond)?
Angular2 is entirely component-based. Controllers and $scope are no longer used. They have been replaced by components and directives. Components are directives with a template. Angular 2 is using Typescript which is super set of javascript. Angular 1.x was not built with mobile support in mind, where Angular 2 is mobile oriented.
- What is a component? Why would you use it?
In Angular 2, “everything is a component.” Components are the main way we build and specify elements and logic on the page, through both custom elements and attributes that add functionality to our existing components.
- What is the minimum definition of a component?
- What is a module, and what does it contain?
NgModules help organize an application into cohesive blocks of functionality. NgModules consolidate components, directives, and pipes into cohesive blocks of functionality, each focused on a feature area, application business domain, workflow, or common collection of utilities.
- What is a service, and when will you use it?
Services are JavaScript functions that are responsible for doing a specific task only. Angular services are injected using Dependency Injection mechanism and include the value, function or feature which is required by the application. Using a separate service keeps components lean and focused on supporting the view.
- What is a promise? Explain it laymen's terms.
- What are the lifecycle hooks for components and directives?
- What are pipes? Give me an example.
- What are the differences between reactive forms and template driven forms?
- What is a dumb, or presentation, component? What are the benefits of using dumb components?
- How do components communicate with each other?
- How would you use http to load data from server?
- How do you create routes?
- How can you get the current state of a route?
- How do you create two-way data binding?
- How do you load external modules?
- How would you display form validation errors?
- Which lifecycle hook would you use to unsubscribe an observable?
- How are services injected to your application?
- How would you create route parameters and access them from a component?
- Why would you use Angular instead of another framework, e.g., React?
- What is the difference between an observable and a promise?
- What is the difference between a component and a directive?
- Why would you use typescript aka benefits of typescript?
- Why different life cycle hooks are needed for a component/directive?
- Why does angular use rxjs?
- What is the purpose of using zone.js?
- What is the difference between ngOnInit() and the constructor() of a component?
- When will ngOnInit() be called? How would you make use of ngOnInit()?
- What are the benefits of using formBuilder?