Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mrshawnspencer/77b87bd3129a3d526c7c9e48bda0c535 to your computer and use it in GitHub Desktop.
Save mrshawnspencer/77b87bd3129a3d526c7c9e48bda0c535 to your computer and use it in GitHub Desktop.
/*
Angular @Component Directive
If you are using an HTML file as the template in an angular component:
*/
@Component({
selector: 'app-provider-search',
templateUrl: './provider-search.component.html',
styleUrls: ['./provider-search.component.scss']
})
/*
If you are using one line of HTML, use single or double quotes.
NOTE: templateUrl becomes template.
*/
@Component({
selector: 'app-provider-search',
template: '<h1>{{pageTitle}}</h1',
styleUrls: ['./provider-search.component.scss']
})
/*
If you are using multiple lines of more readable HTML, use (ES 2015) back-ticks:
*/
@Component({
selector: 'app-provider-search',
template: `
<div>
<h1>{{pageTitle}}</h1>
<div>
My angular component.
</div>
</div>
`,
styleUrls: ['./provider-search.component.scss']
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment