This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<app-d></app-d> | |
<app-c></app-c> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app-c { | |
grid-area: purple; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<app-a></app-a> | |
<app-b></app-b> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:host { | |
/* | |
* Ignore this smart-component wrapper, allowing us to position dumb child components | |
* in the global CSS Grid layout! | |
* Not supported in IE or Edge at all! | |
* https: //caniuse.com/#search=display%3A%20contents | |
*/ | |
display: contents; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(async(() => { | |
TestBed.configureTestingModule({ | |
declarations: [ MyParentComponent ], | |
schemas: [ NO_ERRORS_SCHEMA ] | |
}).compileComponents(); | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my-child [item]="items" | |
(clicked)="onClick($event)"> | |
</my-child> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Input() items: Array<T>; | |
@Output() click = new EventEmitter<T>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { CoverageMetricsLieComponent } from './coverage-metrics-lie.component'; | |
describe('CoverageMetricsLieComponent', () => { | |
let component: CoverageMetricsLieComponent; | |
let fixture: ComponentFixture<CoverageMetricsLieComponent>; | |
beforeEach(async(() => { | |
TestBed.configureTestingModule({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'nea-coverage-metrics-lie', | |
templateUrl: './coverage-metrics-lie.component.html', | |
styleUrls: ['./coverage-metrics-lie.component.scss'] | |
}) | |
export class CoverageMetricsLieComponent implements OnInit { | |
data: number[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div *ngIf="hasData(); else nodata"> | |
<div *ngFor="let item of data" | |
class="item" | |
(click)="delete(item)"> | |
{{ item }} | |
</div> | |
</div> | |
<ng-template #nodata> | |
No data |