Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
feat(overlay): content viewchild static true
Browse files Browse the repository at this point in the history
* remove unused imports
  • Loading branch information
marcjulian committed Dec 2, 2019
1 parent 0f518e7 commit e3703ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
import {
Component,
OnInit,
HostBinding,
AfterViewInit,
EventEmitter,
AfterContentInit,
AfterContentChecked,
AfterViewChecked
} from '@angular/core';
import { Component, HostBinding } from '@angular/core';
import { SafeStyle, DomSanitizer } from '@angular/platform-browser';

@Component({
selector: 'fiv-overlay-content',
templateUrl: './overlay-content.component.html',
styleUrls: ['./overlay-content.component.scss']
})
export class FivOverlayContent implements OnInit {
export class FivOverlayContent {
@HostBinding('style')
get myStyle(): SafeStyle {
return this.priority
Expand All @@ -26,6 +17,4 @@ export class FivOverlayContent implements OnInit {
priority: number;

constructor(private sanitizer: DomSanitizer) {}

ngOnInit() {}
}
2 changes: 1 addition & 1 deletion projects/core/src/lib/overlay/overlay.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { FivOverlayService } from './overlay.service';
export class FivOverlay {
private componentRef: ComponentRef<FivOverlayContent>;

@ViewChild('content', { static: false }) ngContent: TemplateRef<any>;
@ViewChild('content', { static: true }) ngContent: TemplateRef<any>;
@Input() priority;
@Output() afterInit = new EventEmitter();
private _open = false;
Expand Down
4 changes: 1 addition & 3 deletions projects/core/src/lib/popover/popover-element.directive.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { FivPopover } from './popover.component';
import { Directive, ElementRef, Input, AfterViewInit } from '@angular/core';
import { tap, delay } from 'rxjs/operators';
import { of } from 'rxjs';

@Directive({
selector: '[fivPopover]',
exportAs: 'fivPopover'
})
export class PopoverElementDirective implements AfterViewInit {
_show: boolean;
ready: boolean = false;
ready = false;
@Input('fivPopover.delay') delay = 150;
@Input() fivPopover: FivPopover;

Expand Down

0 comments on commit e3703ff

Please sign in to comment.