An open API service indexing awesome lists of open source software.

https://github.com/agoalofalife/aromatic

Templates for render
https://github.com/agoalofalife/aromatic

js-template template-js templates templating typescript

Last synced: 10 months ago
JSON representation

Templates for render

Awesome Lists containing this project

README

          

## Aromatic
## **What is it?**

This is templates with elements [mustache](http://mustache.github.io/) and similar to [handlebars](http://handlebarsjs.com/)

Written [Typescript](http://www.typescriptlang.org/) and a little bit rock and roll.

To use it is quite simple and trivial.

**How to install?**

```
npm install aromatic
```

* [Simple expressions](https://github.com/agoalofalife/aromatic/wiki/Simple-expressions)

* [Escape HTML](https://github.com/agoalofalife/aromatic/wiki/Escape-HTML)

* [Loop](https://github.com/agoalofalife/aromatic/wiki/Loop)

* [Filter values](https://github.com/agoalofalife/aromatic/wiki/Custom-Filter-function)

| Expression | How to use |
|-------------------- |:-------------------------------------------------: |
| {{ value }} | Insert the values from the object the first level |
| {{ !!value!! }} | Insert the value of the first level with tagged |
| {{ value.value }} | Insert nested objects, following levels |
| {{ #each array }} | Through data loop over array of objects |
| {{ /each }} | The end of loop |
| {{ #if contecxt }} | If the current context is present |
| {{ /if }} | the end conditions |
| {{ #else }} | otherwise, if the current context does not have |