promotion

Friday, June 13, 2014

Comments in HAML

There are two types of comments in HAML files.
1. Single line Comment

Single line comments can be written in two ways.

This will create the HTML comment that will sent to client(visible in 'view source' of the web page)
/ comment text
This will comment the code so that will not sent to the client:
-# comment text
2. Multi line Comment
-#  
    Everything indented below the comment symbol is considered as comment
    below
    text
    is
    not
    visible
    in view source of the file
    

No comments:

Post a Comment