One of the big problems of interviewing Angular developers is that every now and then there’s a new version of the framework that affects the way in which some things are done within this technology’s context, however, some things from Angular’s core have persisted for a few years now, and that’s a point we can take advantage of when it comes to evaluating a programmer.
Angular developer’s best practices
A criterion to be used for hiring an Angular developer is that he implements best practices in the code he writes. Let’s see some of the most common guidelines that prevail in most versions of this technology:
To maintain the components small and reusable, meaning, using the single responsibility principle, this will allow the code to be more easily debugged.
To use the deferred load so that the initial loading time of the components improves the application’s starting.
To avoid logic in templates, instead use a specific component for it.
Angular has the particularity of implementing several design patterns that are most of the time necessary in order to develop in this framework, which is why having them into account when doing a code review can help in making the hiring decision.
Some key interview questions for a candidate wanting the Angular developer position, can be focused on concepts that seem basic but important to understand such as Angular’s lifecycle hooks or deferred load.
To start, we can determine a programer’s knowledge level by asking some of these questions:
What is a dependencies injection in Angular?
What is Angular Ivy?
What is service-side rendering? and How is it possible to implement it in Angular?
What are the lifecycle hooks and which ones are available?
What are the types of directives in Angular?
What are the observables and what can we do with them?
What is deferred load?
What is a class decorator?
What is binding?
What is the purpose of @NgModule?
Take-home tests as a complement to the interview
Objective: To build an e-commerce of 6 products, they must have the name, category, and prince in american dollars.
The application must have 2 views: the page with the products listing and the purchase summary.
The user should be able to add products to the shopping cart.
The user should be able to switch prices into three currencies: USD, CAD, EUR.
The 6 products listing must be put in a .json file to be used within the project.
An external API must be used to do the currency changeover.
This type of project, as you can see, should not take the candidate more than a week, he could even do it in a couple of days at a significant speed. A good idea could be asking the candidate to estimate the development time and see if indeed he is able to deliver it within that time frame, that way, we could evaluate how good he is at estimating delivery time frames.