angular 2 and template: Unterminated string literal.at line 6 col 24

Viewed 12038

In the code below, for some reason when I enter a new line after template it gives me an error. All my tags must be in one line '<h1>...<h2> etc.' - The minute I hit enter after the template: 'enter it gives me an error.

Unterminated string literal.at line 6 col 24 TS Error Property assignment expected.at line 7 col 10 TS Error ',' expected.at line 7 col 25 TS Error Type expected.at line 7 col 27 TS Error Unterminated regular expression literal.at line 7 col 28 TS Error ',' expected.at line 8 col 1

import {Component} from 'angular2/core';

@Component({
    selector: 'ponyracer-app',
    template:
    '<h1>PonyRacer</h1>
     <h2>{{numberOfUsers}}</h2>'
})
export class PonyRacerApp {

    numberOfUsers: number = 146;
}
1 Answers
Related