0

I have following code segments in my Test Module test.component.ts

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-test',
  template: `<h2>Welcome {{name}}</h2><input type="text" value="Taylor"`,
  styles:[

  ]

})
export class TestComponent implements OnInit {

  public name = "Taylor";
  public myId = "testId";


  constructor() { }

  ngOnInit(): void {
  }

}

but compilar occurred following error message

WARNING in AngularCompilerPlugin: Forked Type Checker exited unexpectedly. Falling back to type checking on main thread.

ERROR in Errors parsing template: Unexpected character "EOF" ("nt({
  selector: 'app-test',
  template: `<h2>Welcome {{name}}</h2><input type="text" value="Taylor"[ERROR ->
]`,
  styles:[

"): D:/Angular/hello-world/src/app/test/test.component.ts@4:71

how could I fix this problem?

1
  • did it worked?? Commented Feb 13, 2020 at 8:43

1 Answer 1

1

I guess you forget to close input tag. Do it like this, you missed this >.

template: `<h2>Welcome {{name}}</h2><input type="text" value="Taylor">`
Sign up to request clarification or add additional context in comments.

1 Comment

Happy coding.. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.