What are the difference between @injectable() vs. @inject() in angular 2?
@Injectable | @Inject | |
---|---|---|
1. | Aims to set metadata of dependencies to be injected into constructor | Tells Angular what parameter must be injected |
2. | Without it, no dependency can be injected | Only needed to inject primitives |
BY Best Interview Question ON 13 Jan 2019