Skip to content

Instantly share code, notes, and snippets.

View kevinchisholm's full-sized avatar

Kevin Chisholm kevinchisholm

View GitHub Profile
<my-test-item (delete)="onTestPropertyDelete($event)"
[testProperty]="sampleData"></my-test-item>
<!-- Resources -->
<h2>Resources</h2>
<p>Here are some links to help you get started:</p>
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'my-test-item',
templateUrl: './test-item.component.html',
styleUrls: ['./test-item.component.css']
})
export class TestItemComponent {
@Input() testProperty;
@Output() delete = new EventEmitter();
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'my-test-item',
templateUrl: './test-item.component.html',
styleUrls: ['./test-item.component.css']
})
export class TestItemComponent {
@Input() testProperty;
@Output() delete = new EventEmitter();
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Component, Input, Output } from '@angular/core';
@Component({
selector: 'my-test-item',
templateUrl: './test-item.component.html',
styleUrls: ['./test-item.component.css']
})
export class TestItemComponent {
@Input() testProperty;
@Output() delete;
import { Component, Input, Output } from '@angular/core';
<h1>{{ testProperty.name }}</h1>
<div>{{ testProperty.address }}</div>
<div>{{ testProperty.phone }}</div>
<my-test-item [testProperty]="sampleData"></my-test-item>
<!-- Resources -->
<h2>Resources</h2>
<p>Here are some links to help you get started:</p>
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'my-first-angular-application';
import { Component, Input } from '@angular/core';
@Component({
selector: 'my-test-item',
templateUrl: './test-item.component.html',
styleUrls: ['./test-item.component.css']
})
export class TestItemComponent {
@Input() testProperty;
}