Puru Vijay
Puru Vijay

Reputation: 28

Angular Visual Studio code showing strange errors

I'm sorry if the title isn't easily understandable at one glance. But I'm having very weird behaviour in my visual studio code. I'm seeing errors for very weird things like:

[ts] Cannot find name 'constructor'

and many more. The errors started after I edited the code on another computer and pushed to git. On my main computer, I pulled from my git repo. The files came with many weird characters which i had to remove manually. All other files are working fine, but this specific file, verify.component.ts is showing weird behaviour. Someone help me please!! Thank you

The reposiory

The image

Upvotes: 0

Views: 477

Answers (3)

Arun Raj R
Arun Raj R

Reputation: 2317

Incorrect syntax, please remove the curly braces and try.

enter image description here

Upvotes: 1

JSON
JSON

Reputation: 1623

as Sajeetharan said, and Also you are not implementing the AfterViewInit

ngAfterViewInit() {

  }

Upvotes: 0

Sajeetharan
Sajeetharan

Reputation: 222722

You do not need }

export class VerifyComponent implements AfterViewInit {
  @ViewChild('username')  username: MatInput;
} // remove this }

Upvotes: 1

Related Questions