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

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.

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.