Commenting (out) code in Angular2 TypeScript

前端 未结 3 1961
南笙
南笙 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:41

    Does not seem to work, though, because it only hides the HTML, while still trying to execute the typescript code inside the commented section.

提交回复
热议问题