https://github.com/kevinhellos/razorjs
0.6 kb JavaScript templating library
https://github.com/kevinhellos/razorjs
razorjs templating-library
Last synced: over 1 year ago
JSON representation
0.6 kb JavaScript templating library
- Host: GitHub
- URL: https://github.com/kevinhellos/razorjs
- Owner: kevinhellos
- License: mit
- Created: 2023-07-20T07:42:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-17T17:38:00.000Z (over 2 years ago)
- Last Synced: 2025-01-21T21:09:01.517Z (over 1 year ago)
- Topics: razorjs, templating-library
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RazorJS
JavaScript library for Razor (@) templating.
⚠️ Warning: DO NOT USE in production
There is a bug in which all eventListener in the document is cancelled off.
# CDN link
```html
```
# Usage examples
**Data Binding (bind value)**
```html
@color
var color = "blue"; // set the value variable "color"
```
**Data Binding (bind js)**
```html
Click me
var sayhello = `onclick="alert('Hello')"`;
```
**Data Binding (bind component)**
```html
@goodmorning
var goodmorning = '<h3>Good Morning</h3>';
```