angular-jsx
angular-jsx copied to clipboard
Handle all JSX on page
Currently the following won't work.
var a = ['a', 'b', 'c'];
var x = {
template: (
<ul>
(a.map(function (i){
return <li>i</li>
}))
</ul>
)
}
Hi! Could you describe your use-case? I want to understand how this would fit into the "Angular way" since traditional Angular templates are static HTML.
@eranimo is trying to use real jsx code as a template. @thesam I think you should change the description of this package to a more appropriate one, because it's not jsx compatible, it's a way to put templates inline, but you can't use jsx syntax.
In my case, I am making this with angular 1.5 components and Babel ES6 syntax:
let appComponent = {
restrict: 'E',
template: `
<div class="app">
<div ui-view></div>
</div>
`
}
export default appComponent