Interview Questions

What is Angular?
Angular is a popular front end SPA Framework for web apps and cross platform apps. SPA stands for Single Page Application. Angular is open source. Angular2 and higher is written in typescript and is developed and maintained by Google. The most common feature Angular is known for is declarative templates but there are many other excellent features such as data-binding, dependency injection, validation, event handlers, client and server communication and much more. There is a an older version which is still popular and is commonly referred to as AngularJS. AngularJS is written in JavaScript and is still maintained by Google. If you are searching for specific interview questions for AngularJS you can find those here soon.

What is Angular CLI?
Angular CLI is a command line tool used to generate code for Angular projects. Angular CLI stands for Angular Command Line Interface. Creating a new Angular project can be very tedious as you have to install all the dependencies and configure them and then you have to wire together the whole project. Angular CLI makes this a breeze as all the code for a new project is generated with a single command line "ng new myprojectname". During the course of development you can use Angular CLI to generate skeleton code for components, routes, services and pipes which frees up the developer to focus on domain specific code. Angular CLI has the ability to serve the application you are working on while developing it. While serving the application it also features LiveReload ability which means as you make changes in your app Angular CLI will recompile and re serve the application automatically for you.

What is Typescript?
Typescript is a superset of JavaScript which means it has all the features of JavaScript plus more optional static typing features. Typescript transcompiles into JavaScript. Typescript is an open source language developed and maintained by Microsoft and currently hosted on GitHub. Typescript adds features like classes, modules, and an arrow function syntax as laid out in the ECMAScript 2015 standard. The main thing to know about Typescript is that everything is "strongly typed" hence why it is called "Type" script. There are Typescript definition files for many JavaScript libraries.

What is TSLint?
TSLint is a code checking analysis tool for Typescript. TSLint will check Typescript code in real time while it is being typed out and when it is compiled. TSLint checks for readability, maintainability and functionality errors. TSLint scans for a configuration file named tslint.json to see which rules it should follow.

What is npm?
First and foremost npm is one of the worlds largest software repositories consisting of mostly script libraries. npm stands for Node Package Manager. npm is also a widely used software package manager and installer. npm is widely used in the development of Angular projects.

What is yarn?
Yarn is a package manager similar to npm. When yarn came out it had key features which differentiated it from npm such as dependency lock down, security and faster installing speeds. However since then npm has caught up to yarm with simialir features. Yarn is most well known for introducing yarn.lock which would lock down dependences however npm later introduced package-lock.json to provide similar lock down of dependencies. Theses days there is not a lot of difference between Yarn and npm. Yarn also downloads its files from a mirror of the npm site. Yarn is an open source project developed by Facebook.

What is <router-outlet>?
is the placeholder in the html page where you intend on rendering your Angular app.

What is a component?
Components are the building blocks of Angular. Angular is a component oriented architecture where an Angular application is a tree of components. A component consists of a template for the UI and a class decorated with @Component({}) for the logic code that makes the component work. A component can be broken down into 4 files: app.component.css, app.component.html, app.component.spec.ts and app.component.ts. A component has Metadata declared in the decorator.

What is a template in Angular?
A template is a snippet of html representing the user facing view of a component. This is where you will define buttons, grids, headers, text etc. Templates are written in html. The tag used for a template is as of version Angular 4. Almost all html is valid except

What is MVVM?
MVVM stands for Model View ViewModel. Angular is not necessarily MVVM but it implements a lot of the concepts of MVVM. You could say that MVVM lives inside of components. A components template acts as the View in MVVM. A components class has properties which act as the model. A components class also has methods which act as the ViewModel.

What is interpolation?
In Angular interpolation is the embedding of code expressions inside of html markup. Angular uses the delimiter {{...code express goes here ...}} (double curly braces) for interpolation. Code expressions are placed inside the curly braces. String interpolation is also referred to as moustache syntax.

What is databinding?
Databinding is one of the most important concepts in Angular. Databinding is done using interpolation with curly braces. An example in an html template would be <h1>{{title}}</h1> and in the class would be a variable like so: title = 'Angular Project'.

What are services?
Angular services are objects which separate out non UI related functions such as getting data from the server. Other functions could be validation, logging or accessing storage.

What are pipes?
In Angular a pipe is something that takes in some data and then does something to that data to transform it and then outputs the result.