Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to leave comments in templates #28814

Open
iskathi opened this issue Feb 19, 2019 · 6 comments
Open

Option to leave comments in templates #28814

iskathi opened this issue Feb 19, 2019 · 6 comments
Labels
area: core Issues related to the framework runtime core: basic template syntax feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@iskathi
Copy link

iskathi commented Feb 19, 2019

馃殌 feature request

Relevant Package

This feature request is for @angular/core

Description

Comments are removed in the rendered angular view. We are using another framework alongside angular whose bindings are within the comments. Our whole code base is written using that framework and we cannot afford to stop development to completely migrate all our code to angular. Which is why we want to do it in small iteration.

Stackblitz sample: https://stackblitz.com/edit/angular-zhw3az?file=src%2Fapp%2Fapp.component.ts

image

Describe the solution you'd like

An option within the Component decorator to leave comments

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

Describe alternatives you've considered

The alternative would be to completely rewrite all our views changing those bindings.
@spock123
Copy link

Shouldn"t this be a tsconfig option?

@pkozlowski-opensource pkozlowski-opensource added the area: core Issues related to the framework runtime label Feb 19, 2019
@ngbot ngbot bot added this to the needsTriage milestone Feb 19, 2019
@iskathi
Copy link
Author

iskathi commented Feb 19, 2019

Shouldn"t this be a tsconfig option?

Seemed specific to the template engine and felt right having it near templateUrl option, but angularCompilerOptions could also work

@alxhub alxhub added the feature Issue that requests a new feature label Apr 18, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Apr 18, 2019
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jun 4, 2021
@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 4, 2021

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 24, 2021

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added the feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors label Jun 24, 2021
@kolkov
Copy link

kolkov commented Feb 22, 2022

I think that it is possible to make some kind of white list, which comments should not be removed from the templates.

@jessicajaniuk jessicajaniuk added feature: under consideration Feature request for which voting has completed and the request is now under consideration and removed feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature: votes required Feature request which is currently still in the voting phase labels Apr 20, 2022
@jessicajaniuk jessicajaniuk added this to Inbox in Feature Requests via automation Apr 20, 2022
@jessicajaniuk jessicajaniuk moved this from Inbox to Needs Discussion in Feature Requests Apr 20, 2022
@pkozlowski-opensource
Copy link
Member

This makes sense. We should review our comments strategy in templates and have 2 types of comments:

  • HTML ones that "survive" compilation
  • other comments removed by the compiler

@jessicajaniuk jessicajaniuk moved this from Needs Discussion to Needs Project Proposal in Feature Requests Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime core: basic template syntax feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
No open projects
Feature Requests
Needs Project Proposal
Development

No branches or pull requests

6 participants