Angular Interview Questions

Interview questions related to the Angular Javascript Framework. Most come from actual interviews, but some I just think would make good interview questions.

What is ‘inversion of control’ (IoC)?
For an in-depth look at IoC, see this Martin Fowler write-up and here for how it relates to Dependency Injection.

Basically, in IoC, instead of your code telling the system what actions to take, the system itself (in this case Angular) tells which portions of your code to run and what resources to use.

Here’s a nice post covering IoC in Node.js, specifically.

Name one difference between factory and service.
A Factory returns a JavaScript object containing functions, while a service does not need to do so.