Last active
September 13, 2018 18:50
-
-
Save csaba-farkas/800dc1f96ae4d74a3e3290c3e1fe3f5d to your computer and use it in GitHub Desktop.
[Angular selector options] #Angular2Plus
This file contains hidden or 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-user></app-user> | |
<!-- <div app-user></div> --> | |
<!-- <div class="app-user"></div> --> |
This file contains hidden or 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: 'app-user', // component | |
// selector: '[app-user]', // attribute | |
// selector: '.app-user', | |
template: './user.component.html', | |
sytleUrls: ['./user.component.css'] | |
}) | |
export class UserComponent implements OnInit { | |
constructor { } | |
ngOnInit() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment