Introduction To Angular 8 - NDC Sydney
Introduction To Angular 8 - NDC Sydney
Introduction To Angular 8 - NDC Sydney
www.angulartraining.com
About me - Alain Chautard (or just Al)
/ Google Maps
1.0 1.2 1.3 1.4 1.5 2.0 4.0 5.0 6.0 7.0 8.0
1.1
1600+
That's how many apps are built with Angular at
Google alone (was 800 just 2 years ago)
Browser independent as it
transpiles down to ES5
anyway
Angular CLI - https://cli.angular.io/
www.angulartraining.com
What are
components? <app-root>
A component's application
logic is defined inside a
class.
templateUrl: './hello.component.html',
Both HTML and CSS for a styleUrls: ['./hello.component.css']
component can be stored in
their own files })
www.angulartraining.com
Angular Data Bindings - [] and ()
● The above sets the value of the value HTML attribute of the
input element to this.name in our component class.
● It also binds the click event to the alertName() method.
Angular Models - [(ngModel)]
www.angulartraining.com
Angular Directives
{{ getDisplayName(person) }}
</li>
Angular *ngIf
www.angulartraining.com
Angular Pipes with |
www.angulartraining.com
Angular Services
@Injectable({
providedIn: 'root'
})
export class TestService {
is equivalent to:
export class ListPostsComponent {
postService : PostsService;
constructor(postService : PostsService) {
this.postService = postService;
}
}
HTTP Client
www.angulartraining.com
Angular HttpClient
@Injectable()
export class CartService {
getCartContents(): Observable<LicensePlate[]> {
return this.http.get<LicensePlate[]>('http://localhost:8000/cart');
}
Component Router
www.angulartraining.com
Angular Component Router
implementation
Dynamic content area where
Here the navigation components
component and the footer get loaded based on the URL
Slides: http://bit.ly/ng8-ndc-sydney
www.angulartraining.com