Differences of using Component template vs templateUrl

前端 未结 6 1233
一整个雨季
一整个雨季 2020-12-14 08:22

Angular 2 allows to write multi-line templates by using ` characters to enquote them. It is also possible to put multi-line template into .html file and referen

6条回答
  •  佛祖请我去吃肉
    2020-12-14 08:42

    Seems to be working now.

    @Component({
      selector: 'my-dashboard',
      templateUrl: './dashboard.component.html',
      styleUrls: ['./dashboard.component.css']
    })
    

    Taken from 'tour of heros' https://angular.io/docs/ts/latest/tutorial/toh-pt5.html and adapted to test this concrete issue.

    angular2@2.0.0-beta.8

提交回复
热议问题