git clone -b fptraining-1 https://github.com/rbrzoska/fp-angular-training.git . npm install -g @angular/cli // ng -v ng new [nazwa_projektu] --ng4 -dir=web cd web ng serve // ng build -w
<head>
<style>
.container[_ngcontent-ikt-1] { ... }
</style>
</head>
<body>
<my-app>
<song-track _nghost-ikt-1>
<div _ngcontent-ikt-1 class="container"></div>
</song-track>
</my-app>
</body>
selector: 'element-name'
template: `Hello {{name}}` templateUrl: 'my-component.html'
styles: ['.error { color: red }'] styleUrls: ['my-component.css']
changeDetection: (OnPush, Default)
encapsulation: (Emulated, Native, None)
@Input() myProperty;
@Output() myEvent = new EventEmitter();
@HostListener('click', ['$event']) onClick(e) {...}
@ViewChild(myPredicate) myChildComponent;
@ContentChild(myPredicate) myChildComponent;