| 123456789101112131415161718192021 |
- import { Component, OnInit, ElementRef, ViewChild, ChangeDetectorRef } from '@angular/core';
-
- @Component({
- selector: 'app-componentWithContentOrNot',
- templateUrl: './componentWithContentOrNot.component.html',
- styleUrls: ['./componentWithContentOrNot.component.css']
- })
- export class ComponentWithContentOrNotComponent implements OnInit {
- // @ViewChild('content') content: ElementRef;
-
- constructor(
- private changeDetector: ChangeDetectorRef
- ) {}
-
- ngOnInit() {
- }
-
- hasChildChange(event) {
- this.changeDetector.detectChanges()
- }
- }
|