slm: Doesn't work with new Angular 2 attribute syntax
Basically something like this:
div([value]="boundValue")
Throws a syntax error saying it is expecting an attribute. I’m assuming that is because SLM/SLIM expect [] to be used to surround attribute lists. I see no reason this can’t be supported however.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 18 (12 by maintainers)
Commits related to this issue
- Allow specify custom attribute delimiters. [ref #20] — committed to slm-lang/slm by yury 8 years ago
@Systho yes as mentioned above just write this:
template="ngFor #item of list"So I’ve done some more comprehensive testing and found the following do not work:
Does not work
*ngFor="#item of list'[]syntax for input bindings()syntax for output bindingsDoes work
*ngIf='something'template="ngFor #item of list"bind-thing="otherThing"syntax for input bindingson-thing="doThing()"syntax for output bindingsSpecifically it seems the
*ngForsyntax only breaks because it is followed by a value that starts contains spaces. You will find the the following statements compile fine (although they don’t do anything):*ngFor='#item'*ngFor='anythingFor the time being there are reasonable workarounds for everything, (in fact I may even prefer the
bind-andon-syntaxes). However I do feel it is important to be able to support Angular 2’s templates.