https://github.com/tomusdrw/ng2-jsx
Using JSX syntax in Angular2 templates.
https://github.com/tomusdrw/ng2-jsx
Last synced: 6 days ago
JSON representation
Using JSX syntax in Angular2 templates.
- Host: GitHub
- URL: https://github.com/tomusdrw/ng2-jsx
- Owner: tomusdrw
- Archived: true
- Created: 2015-12-18T23:36:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-18T23:49:47.000Z (over 10 years ago)
- Last Synced: 2025-01-31T14:22:42.192Z (over 1 year ago)
- Language: TypeScript
- Size: 3.91 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Using JSX in Angular2 applications
## Exemplary usage
```typescript
@Component({
selector: Component.toString(),
inputs: ['val'],
template: (
Hello World
)
})
class JsxComponent {
public val : string;
static toString () {
return 'jsx-component';
}
}
@Component({
selector: JsxContainer.toString(),
directives: [CORE_DIRECTIVES, JsxContainer.tpl.directives],
template: JsxContainer.tpl
})
class JsxContainer {
static toString () {
return 'jsx-container';
}
static get tpl () {
return (
);
}
}
```
See `example` folder for complete code.