NG Interview Set I - Architecture/ Framework Questions Flashcards
NG Interview Set I - Architecture/ Framework Questions
What are some of the top level building blocks of the Angular framework?
- Services, Templates, Modules, Components, Providers, etc.
What is AOT?
- Ahead of time compilation
What is Reactive programming and how does it relate to Angular?
- It’s an “asynchronous programming paradigm concerned with data streams and the propagation of change.”
What are some differences between Angular 2 and 4?
- Improvements in AOT, allowing the “else” clause in ngIf, support for TypeScript 2.1, breaking out the animations package…
What are some security related features built in to the Angular framework?
- Sanitation, to prevent cross site scripting
- Built-in support in the HttpClient to prevent cross-site request forgery
How can you bypass sanitation in Angular and why would you do so?
- To inject known safe code, you can bypass sanitation (e.g. to embed an iframe)
What is a good use case for ngrx/store?
- Complex application state management requirements, involving asynchronous requests to update state
What is Redux and how does it relate to an Angular app?
- It’s a way to manage application state and improve maintainability of asynchronicity in your application by providing a single source of truth for the application state, and a unidirectional flow of data change in the application
- ngrx/store is one implementation of Redux principles
What would be a good use case for having your own routing module?
- An application whose requirements imply having many routes, and potentially route guards, and child routes
Where would you configure TypeScript specific compiler options for your project?
- In the tsconfig.json
What is the tslint.json file used for?
Linting the TypeScript code (making sure it conforms to certain standards / conventions)
What are some changes introduced in Angular 4?
- Introduction of the else clause in ngIf; splitting out of animation package; support for TypeScript 2.1; improvements around AOT
What are some changes introduced in Angular 5?
- New version of HttpClient; build optimizer; Universal State Transfer API (allows sharing state of app between server and client easily); support for TypeScript 2.3