Skip to content

Instantly share code, notes, and snippets.

@natmegs
Created December 20, 2017 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natmegs/d49d3f5788bfc11f549db49357617d00 to your computer and use it in GitHub Desktop.
Save natmegs/d49d3f5788bfc11f549db49357617d00 to your computer and use it in GitHub Desktop.
Dynamic component
import { Component, Input } from '@angular/core';
@Component({
selector: 'hello',
template: `<h1>Hello {{name}}!</h1>`,
styles: [`h1 { font-family: Lato; }`]
})
export class DynamicComponent {
@Input() name: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment