Inject an Angular Service into a Component using Providers

Share this video with your friends

Send Tweet

This lesson explains how we can inject simple service dependencies into Angular 2 components using providers. We’ll also discuss what providers are and why they are needed.

Luis  Avila
Luis Avila
~ 7 years ago

great, how to run this project ?, I download this project an open with webStorm and try run. ng serve and the result it's "You have to be inside an angular-cli project in order to use the serve command."

Rahn
Rahn
~ 7 years ago

Error in TRANSCRIPT: import { Comonent, OnInit } from '@angular/core'; Missing 'P' ;) in 'Component'