-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directives should support multiple selectors #34
Comments
@tbosch - I really need your help with this one! |
Not sure if this helps, but this happens because of the Angular2 appears to complain and not want to recognize it as part of a You would have to probably use it as |
@emoralesb05 - You are correct. The |
@tbosch - converting the input property to a map also does not work and continues to throw a template parsing error! @Directive({ selector: '[fx-layout]' })
export class LayoutDirective {
public layout = { 'default' : 'row' };
/**
* Layout property: map default direction value and responsive keys that are optional
*/
@Input('fx-layout') set defaultLayout(direction) {
this.layout.default = direction || "row";
}
} and markup with Invalid property name 'fx-layout.xs' (" fx-layout="row" *ngIf="isVisible">
<div [fx-layout]="firstCol"
[ERROR ->][fx-layout.xs]="firstColXs"
[fx-layout.md]="firstColMd" |
Support for both full property assignment or property chain assignments is in-progress. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently only a single directive syntax is supported. Consider the Layout directive
and its markup usage:
All ^ works fine.
Issue
Consider the use of multiple selectors with non-default used in markup
The following does NOT throw any errors:
But consider this scenario:
or
In ^ this case, the expectation is a Layout directive instance would be created, and the
@Input('fx-layout.xs') layoutXs
would be assigned the value of the direction variable ( or 'column' string).Instead, we get this error:
Desired Result:
This should work without any errors:
The text was updated successfully, but these errors were encountered: