Commenting (out) code in Angular2 TypeScript

前端 未结 3 1988
南笙
南笙 2021-01-05 03:37

I have the following Angular2 TypeScript code with a section commented out as per Javascript convention:

@Component({
    selector: \'my-app\',
    template:         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 04:24

    If you are in the template, use the HTML comment :

    @Component({
      selector: 'my-app',
      template: `
        

    {{title}}

    {{lene.name}}

    {{lene.id}}
    {{lene.description}}
    ` })

提交回复
热议问题