-
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
fxHide with custom breakpoint directive not working in AOT #961
Comments
The StackBlitz you've provided contains no trace of custom breakpoints. Please add it and then follow-up here. |
Forgot to hit save on the stackblitz, the demo link is now up to date. |
Damn that is a terrible bug. I'll investigate this weekend and hopefully track this down. Thanks for catching this! |
@CaerusKaru - this is working great with the latest code base. I added it to our demos. /**
* This one fails to instantiate in demo app with AOT!!
*/
@Directive({selector, inputs})
export class CustomHideDirective extends ShowHideDirective {
protected inputs = inputs;
}
// ****************************************
// Core Library
// ****************************************
/**
* Core ‘show’ Layout API directive
*/
@Directive({selector, inputs})
export class DefaultShowHideDirective extends ShowHideDirective {
protected inputs = inputs;
}
export class ShowHideDirective extends BaseDirective2 implements AfterViewInit, OnChanges {
constructor(protected elementRef: ElementRef,
protected styleBuilder: ShowHideStyleBuilder,
protected styler: StyleUtils,
protected marshal: MediaMarshaller,
@Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions,
@Inject(PLATFORM_ID) protected platformId: Object,
@Optional() @Inject(SERVER_TOKEN) protected serverModuleLoaded: boolean) {
super(elementRef, styleBuilder, styler, marshal);
}
//....
}
export abstract class BaseDirective2 implements OnChanges, OnDestroy {
protected constructor(protected elementRef: ElementRef,
protected styleBuilder: StyleBuilder,
protected styler: StyleUtils,
protected marshal: MediaMarshaller) {
}
//....
} |
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Closes #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Closes #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Closes #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Closes #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Anecdotally I can confirm this has been patched by updating the StackBlitz and running |
@CaerusKaru works great, thanks for addressing this so quickly. |
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
Add demo showing custom breakpoint working with `fxHide.yba-min-height` Refs #961.
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. |
Bug Report
What is the expected behavior?
Expect for the element to hide at desired custom breakpoint
What is the current behavior?
Element hides at desired custom breakpoint when not running aot, but does not hide in aot
What are the steps to reproduce?
https://stackblitz.com/edit/angular-flex-layout-seed-j5xkix
What is the use-case or motivation for changing an existing behavior?
Adding in a min-height breakpoint
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.1.4, Typescript 3.1.6 Flex Layout 7.0.0-beta.22 all browsers
Is there anything else we should know?
You'll need to download the stackblitz and run ng serve (angular.json already set to run aot build)
The text was updated successfully, but these errors were encountered: