This javascript library parses decorators annotations in html and executes the code behind them.
Learn about using the library
Look at the source code
Use the parser functionality in c++
Use the parser functionality in php