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
- Host: GitHub
- URL: https://github.com/agoalofalife/aromatic
- Owner: agoalofalife
- Created: 2017-01-07T16:57:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-18T17:16:19.000Z (over 8 years ago)
- Last Synced: 2025-03-24T23:48:32.034Z (about 1 year ago)
- Topics: js-template, template-js, templates, templating, typescript
- Language: TypeScript
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 |