Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
152
rated 0 times [  153] [ 1]  / answers: 1 / hits: 29033  / 12 Years ago, wed, july 4, 2012, 12:00:00

When writing JSPs, I always use <%-- --%> instead of <!-- --> to write any comments, since it will not output to the HTML. I have begun using AngularJS, and I'm wondering if there's any similar kind of comment construct that I could use. It's not absolutely necessary to not have the comments visible in the HTML source, but I much rather them not being there.



With the limited knowledge I have of AngularJS, I'm not sure how they could prevent it from being in the source, but I just want to ask in case there is a way. Perhaps there's also a best practice for comments in AngularJS? Any input would be appreciated.


More From » comments

 Answers
26

AngularJS is a library for dynamic features in HTML/JS/CSS pages. It's not a template language such as JavaServer Pages. As such, it doesn't have a special syntax for comments. You can still use HTML style comments of course.


[#84467] Tuesday, July 3, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
margaritakristinak

Total Points: 502
Total Questions: 127
Total Answers: 98

Location: England
Member since Mon, May 17, 2021
3 Years ago
;