I am trying to build a <markdown-component> using ES6 syntax. @Input syntactic sugar @Input not supported in ES6, and I cannot find a viable alternative.
I define the input for the parent with:
<ng2-markdown [source]="source"></ng2-markdown>
Then, taking the input using:
@Component({ selector: 'ng2-markdown', inputs: [ 'source' ] })
If I add a template, I can get it, it will output the value as expected, but there will be no way to use the input in the constructor.
This module should be a directive, and the source value will determine the path to the downloaded Markdown file.
source share