I am new to this, so please excuse if I am not getting something obvious here.
Here is the project on Github, if you want to give it a try: https://git.io/vXtWp
Anyhow, I have a simple Angular 2 service that calls YouTube Api, it looks like this:
Then I have an app.component.ts that looks like this:
And HTML file:
My application doesn't work though, it shows as loading with following error:
Uncaught Error: Can't resolve all parameters for FormControl: (?, ?, ?). metadata_resolver.js:499
<input [formControl]="search"> ^
This needs to be the selector or input name of a directive or component, not the class name.
FormControl should be removed from
imports: [...] in
@NgModule(). Only modules should be listed in
@NgModule() not individual classes.
There is no need to list
providers. Adding it to
import is enough.