-
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
template parse error when using only responsive selectors. #59
Comments
Note that show.ts uses: @Directive({selector: `
[fxShow],
[fxShow.xs]
[fxShow.gt-xs],
[fxShow.sm],
[fxShow.gt-sm]
[fxShow.md],
[fxShow.gt-md]
[fxShow.lg],
[fxShow.gt-lg],
[fxShow.xl]
`})
export class ShowDirective extends BaseFxDirective implements OnInit, OnChanges, OnDestroy {
/**
* Original dom Elements CSS display style
*/
private _display = 'flex';
/**
* Subscription to the parent flex container's layout changes.
* Stored so we can unsubscribe when this directive is destroyed.
*/
private _layoutWatcher : Subscription;
@Input('fxShow') set show(val) { this._cacheInput("show", val); }
@Input('fxShow.xs') set showXs(val) { this._cacheInput('showXs', val); }
@Input('fxShow.gt-xs') set showGtXs(val) { this._cacheInput('showGtXs', val); };
@Input('fxShow.sm') set showSm(val) { this._cacheInput('showSm', val); };
@Input('fxShow.gt-sm') set showGtSm(val) { this._cacheInput('showGtSm', val); };
@Input('fxShow.md') set showMd(val) { this._cacheInput('showMd', val); };
@Input('fxShow.gt-md') set showGtMd(val) { this._cacheInput('showGtMd', val); };
@Input('fxShow.lg') set showLg(val) { this._cacheInput('showLg', val); };
@Input('fxShow.gt-lg') set showGtLg(val) { this._cacheInput('showGtLg', val); };
@Input('fxShow.xl') set showXl(val) { this._cacheInput('showXl', val); }; |
@vicb has submitted a Pull Request fix: angular/angular#13653 |
Fixed in Angular SHA 881eb894b: will be available in Angular v4.0.0-beta.2. |
A dumb question :) Why is it angular 4 instead of angular 2? |
Please ignore my previous comment Found the reason for angular 4 https://angularjs.blogspot.com/2016/12/ok-let-me-explain-its-going-to-be.html |
* fix(fxHide,fxShow): fix standalone breakpoint selectors * Many directive selectors were missing a `,` separator between then xs and gt-xs breakpoints * fxShow, fxHide preserve and restore the element's original display CSS style * added more tests standalone breakpoint selectors, disabled selectors, and deactivated mediaQueries fixes #62, closes ##59. * fix(api): add missing comma-delimiter in breakpoint selectors * add test to use md breakpoint via `fxHide.md` * fix(fxShow, fxHide): restore proper display mode when not active The fxHide and fxShow should not change the display mode to 'flex'. Instead the display mode (when not 'none') should be the default (=== 'block') or the explicitly assigned display mode for that element. Fixes #105.
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. |
Developers currently must use the default API when one or more responsive APIs are defined.
Consider the following scenario where the default is
fxShow
and the responsive API defined isfxShow.xs
:The above ^ works fine. When I do not, however, specify the default non-responsive selector
fxShow
:then a Template Parse error occurs:
Here is the Plunkr Demo that shows this.
The text was updated successfully, but these errors were encountered: