Reputation: 366
Using Angular 11 , trying to create a Template driven form. The ts file has following code
submit(xyz){
var firstName = form.firstName;
console.log(firstName);
}
SO I get the error
error TS7006: Parameter 'form' implicitly has an 'any'
type.
submit(xyz){
Upvotes: 0
Views: 1219
Reputation:
Just give the function and the params a type like:
submit(xyz: object): void {
...
This is just typescript being extremely careful about your types. It's not an error. Just a warning.
Upvotes: 1