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

Commit e3703ff

Browse files
committed
feat(overlay): content viewchild static true
* remove unused imports
1 parent 0f518e7 commit e3703ff

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
import {
2-
Component,
3-
OnInit,
4-
HostBinding,
5-
AfterViewInit,
6-
EventEmitter,
7-
AfterContentInit,
8-
AfterContentChecked,
9-
AfterViewChecked
10-
} from '@angular/core';
1+
import { Component, HostBinding } from '@angular/core';
112
import { SafeStyle, DomSanitizer } from '@angular/platform-browser';
123

134
@Component({
145
selector: 'fiv-overlay-content',
156
templateUrl: './overlay-content.component.html',
167
styleUrls: ['./overlay-content.component.scss']
178
})
18-
export class FivOverlayContent implements OnInit {
9+
export class FivOverlayContent {
1910
@HostBinding('style')
2011
get myStyle(): SafeStyle {
2112
return this.priority
@@ -26,6 +17,4 @@ export class FivOverlayContent implements OnInit {
2617
priority: number;
2718

2819
constructor(private sanitizer: DomSanitizer) {}
29-
30-
ngOnInit() {}
3120
}

projects/core/src/lib/overlay/overlay.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { FivOverlayService } from './overlay.service';
1919
export class FivOverlay {
2020
private componentRef: ComponentRef<FivOverlayContent>;
2121

22-
@ViewChild('content', { static: false }) ngContent: TemplateRef<any>;
22+
@ViewChild('content', { static: true }) ngContent: TemplateRef<any>;
2323
@Input() priority;
2424
@Output() afterInit = new EventEmitter();
2525
private _open = false;

projects/core/src/lib/popover/popover-element.directive.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { FivPopover } from './popover.component';
22
import { Directive, ElementRef, Input, AfterViewInit } from '@angular/core';
3-
import { tap, delay } from 'rxjs/operators';
4-
import { of } from 'rxjs';
53

64
@Directive({
75
selector: '[fivPopover]',
86
exportAs: 'fivPopover'
97
})
108
export class PopoverElementDirective implements AfterViewInit {
119
_show: boolean;
12-
ready: boolean = false;
10+
ready = false;
1311
@Input('fivPopover.delay') delay = 150;
1412
@Input() fivPopover: FivPopover;
1513

0 commit comments

Comments
 (0)