Skip to content

Instantly share code, notes, and snippets.

@trumbitta
Created March 20, 2019 18:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save trumbitta/ac8c36ef5abc10a0723fb451ebf5cf68 to your computer and use it in GitHub Desktop.
Angular for dads - Intro to components 2
import { Component } from '@angular/core';
@Component({
selector: 'ng4d-greeting-card',
template: `
<article>
<h1>Hello, I'm William!</h1>
<p>And I'm a 41 years old dad.</p>
</article>
`,
styles: [
`
article {
width: 30%;
margin: 2rem auto;
padding: 1rem 2rem;
font-family: sans-serif;
border: 1px solid #cccccc;
}
h1 {
font-family: serif;
margin: 0 0 1rem 0;
}
p {
margin: 0;
}
`,
],
})
export class GreetingCardComponent {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment