real angular 2 comment on template
See original GitHub issueI’m submitting a … (check one with “x”)
[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior As Thierry Templier said on http://stackoverflow.com/questions/36396765/commenting-out-code-in-angular2-typescript If you are in the template, use the HTML comment :
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>{{lene.name}}</h2>
<div><label>id: </label>{{lene.id}}</div>
<!-- div>
<label>name: </label>
<input [(ngModel)]="lene.name" placeholder="name">
</div-->
<div><label>description: </label>{{lene.description}}</div>
`
})
. Expected behavior real angular comment out on template
Minimal reproduction of the problem with instructions but this is not real angular comment
<!-- div>
<label>name: </label>
<input [(ngModel)]="lene.name" placeholder="name">
</div-->
What is the motivation / use case for changing the behavior? because if lene is null, we get exception
Please tell us about your environment:
- Angular version: 2.0.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version
=
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Commenting (out) code in Angular2 TypeScript - Stack Overflow
@GünterZöchbauer I'm working on a very simple Angular2 project and have an HTML comment in my template and the comment is not being...
Read more >Template syntax - Angular
In Angular, a template is a chunk of HTML. Use special syntax within a template to build on many of Angular's features.
Read more >Creating HTML Comments in Angular | Damir's Corner
Although comments in HTML markup usually don't play an important role ... Angular removes all comments from the template during processing.
Read more >Create a commenting Application with Angular 2 - Dunebook
In This Tutorial , we're going to create a commenting Application using angular 2. That will enable users to write comments in various...
Read more >Have you ever bought an Angular template? : r/Angular2
No (use only free templates or from scratch) ... Add a Comment ... Writing a GameBoy game in TypeScript that runs on real...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I find Angular just ignores the comment indicators and renders it anyway. Having a way to comment things out would be a big help.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.