SlideShare a Scribd company logo
a web of applications
kasper reijnders
01 introduction tijd (minuten) 1-3
02 why this subject tijd (minuten) 5-10
03 summarize tijd (minuten) 2-5
04 angular tijd (minuten) 10-20
tonight
introduction
Kasper Reijnders
○ fronteer
○ scout
○ incentronaut
why this subject
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
website
○ using CMS
○ basic frontend functionality
○lightbox
○search
○sharing
○etc…
○ knmg.nl / incentro.com
web apps
○ using content from some repository
○ single page applications
○ advanced frontend
○multiple components
○ facebook.com / twitter.com / airbnb.com
combined
○ apps integrated in site
○ used for ‘difficult’ content / calculations /
checks
○ anwb.nl / unive.nl / snsbank.nl
angular
angular
○ web apps
○ integrated web apps
angular
○ version 1.x
○ version 2.x and above
○next version will be 4.x
angular > 2.x
○ Modular
○components and services
○ TypeScript
○ Annotations
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
typescript
import {Goal} from "../types/goal";
export class ThemeService {
private goal: Goal;
constructor() {
}
}
export class Goal {
title: string;
status: Array<number> | boolean;
planned?: boolean;
}
typescript / es6
function test(i) {
return i + 2;
}
let test = i => i + 2
code
components
ngmodule
input and output
services
pipes
directives
templates
component
import { Component } from '@angular/core';
@Component({
selector: 'batman',
template: '<h1>{{name}}</h1>'
})
export class BatmanComponent {
name: string = 'Batman';
hasParents: boolean = false;
}
component
import { Component } from '@angular/core';
@Component({
selector: 'batman',
template: '<h1>{{name}}</h1>'
})
export class BatmanComponent {
name: string = 'Batman';
hasParents: boolean = false;
}
component
import { Component } from '@angular/core';
@Component({
selector: 'batman',
template: '<h1>{{name}}</h1>'
})
export class BatmanComponent {
name: string = 'Batman';
hasParents: boolean = false;
}
component
import { Component } from '@angular/core';
@Component({
selector: 'batman',
template: '<h1>{{name}}</h1>'
})
export class BatmanComponent {
name: string = 'Batman';
hasParents: boolean = false;
}
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BatmanComponent } from './batman.component';
import { BatMobileComponent } from './batmobile.component';
@NgModule({
imports: [
BrowserModule
],
declarations: [
BatmanComponent, BatMobileComponent
],
bootstrap: [ BatmanComponent ]
})
export class EverythingIsAwesomeApp { }
input and output
import { Component, Input } from '@angular/core';
@Component({
selector: 'batmobile',
template: '<div>{{driver}}</div>'
})
export class BatMobileComponent {
@Input()
driver: string;
}
input and output
import { Component } from '@angular/core';
@Component({
selector: 'batman',
template: '<batmobile [driver]="name"></batmobile>'
})
export class BatmanComponent {
name: string = 'Batman';
hasParents: boolean = false;
}
services
import { Injectable } from '@angular/core';
import { Car } from 'car';
import { CARS } from 'CARS.MOCK';
@Injectable()
export class BatmobileService {
constructor() {}
getCarPark(): Promise<Car[]> {
return Promise.resolve(CARS); // this can be replaced with a REST call
}
getCarByDriver(driver: string): Promise<Car> {
return this.getCarPark().then((cars) => {
return cars.find(car => car.driver === driver);
});
}
}
services
import { Component, Input } from '@angular/core';
@Component({
selector: 'batmobile',
template: '<div>{{driver}}</div>'
})
export class BatMobileComponent {
@Input()
driver: string;
}
services
import { Component, Input, OnInit } from '@angular/core';
import { BatmobileService } from 'batmobileservice';
@Component({
selector: 'batmobile',
template: '<div>{{driver}}</div>'
})
export class BatMobileComponent implements ngOnInit {
@Input()
driver: string;
constructor(private batmobileService: BatmobileService) {}
ngOnInit() {
// ...
}
}
services
...
constructor(private batmobileService: BatmobileService) {}
ngOnInit() {
this.batmobileService.getCarByDriver(this.driver).then((car) => {
this.car = car
});
}
...
pipes
{{ someValue | pipe }}
{{ birthday | date:'fullDate' | uppercase }}
{{ users | filter: 'name' }}
directives
1. Components
2. Structural directives
3. Attribute directives
structural directives
*ngFor
*ngIf
[ngSwitch]
*ngSwitchCase
*ngSwitchDefault
asterisk
<p *ngIf="condition">Our heroes are true!</p>
<template [ngIf]="condition">
<p>Our heroes are true!</p>
</template>
attribute directives
<div [style.background]="'lime'"> some </div>
<p myHighlight [highlightColor]="color"> color</p>
<p [myHighlight]="color">Highlight me!</p>
template options
<input [value]="firstName"> Binds property value to the result of expression firstName.
<div [attr.role]="myAriaRole"> Binds attribute role to the result of expression myAriaRole.
<div [class.extra-sparkle]="isDelightful"> Binds the presence of the CSS class extra-sparkle on the
element to the truthiness of the expression isDelightful.
<div [style.width.px]="mySize"> Binds style property width to the result of expression mySize
in pixels. Units are optional.
<button (click)="readRainbow($event)"> Calls method readRainbow when a click event is triggered on
this button element (or its children) and passes in the event
object.
<my-cmp [(title)]="name"> Sets up two-way data binding. Equivalent to: <my-cmp
[title]="name" (titleChange)="name=$event">
<p>Card No.: {{cardNumber |
myCardNumberFormatter}}</p>
Transforms the current value of expression cardNumber via
the pipe called myCardNumberFormatter.
<p>Employer: {{employer?.companyName}}</p> The safe navigation operator (?) means that the employer
field is optional and if undefined, the rest of the expression
should be ignored.
<p>Hello {{superHero}}</p> Binds text content to an interpolated string, for example,
"Hello Seabiscuit".
template options
angularjs
components
ngmodule
input and output
services
pipes
directives
templates
tips
use angular-cli to jumpstart development -> https://cli.angular.io/
have 1 functionality per file
divide data and function
make reusable components
use folders per type
- batman-project/
- src/scripts/
- components/
- directives/
- services/
- types/
- main.ts
Jan 2017 - a web of applications (angular 2)

More Related Content

PPTX
AngularJS (1.x) as fast as a lightning
PDF
Introduction to angular 4
PDF
Angular - Improve Runtime performance 2019
PDF
Angular server side rendering - Strategies & Technics
PPTX
Migrating an application from Angular 1 to Angular 2
PDF
Exploring Angular 2 - Episode 2
PDF
Angular 2.0 - What to expect
AngularJS (1.x) as fast as a lightning
Introduction to angular 4
Angular - Improve Runtime performance 2019
Angular server side rendering - Strategies & Technics
Migrating an application from Angular 1 to Angular 2
Exploring Angular 2 - Episode 2
Angular 2.0 - What to expect

What's hot (20)

PDF
Angular - injection tokens & Custom libraries
PDF
Ngrx meta reducers
PDF
Express: A Jump-Start
PDF
MVC-RS par Grégoire Lhotelier
PDF
Angular genericforms2
PDF
Angular2 with TypeScript
PDF
Angular 2 - The Next Framework
PPTX
Introduction to Angular2
PDF
The Road to Native Web Components
PDF
Angular 2: What's New?
PDF
Angular Dependency Injection
PDF
CocoaHeads Paris - CATransaction: What the flush?!
PDF
An introduction to Angular2
PPTX
Angular 1.x in action now
PDF
Architecture for scalable Angular applications
PDF
Angular performance improvments
PPTX
Get together on getting more out of typescript &amp; angular 2
PDF
Scala Self Types by Gregor Heine, Principal Software Engineer at Gilt
PDF
Workshop 24: React Native Introduction
PDF
An Intro to Angular 2
Angular - injection tokens & Custom libraries
Ngrx meta reducers
Express: A Jump-Start
MVC-RS par Grégoire Lhotelier
Angular genericforms2
Angular2 with TypeScript
Angular 2 - The Next Framework
Introduction to Angular2
The Road to Native Web Components
Angular 2: What's New?
Angular Dependency Injection
CocoaHeads Paris - CATransaction: What the flush?!
An introduction to Angular2
Angular 1.x in action now
Architecture for scalable Angular applications
Angular performance improvments
Get together on getting more out of typescript &amp; angular 2
Scala Self Types by Gregor Heine, Principal Software Engineer at Gilt
Workshop 24: React Native Introduction
An Intro to Angular 2
Ad

Similar to Jan 2017 - a web of applications (angular 2) (20)

PPTX
Building a TV show with Angular, Bootstrap, and Web Services
PDF
Itsjustangular
PDF
angular fundamentals.pdf angular fundamentals.pdf
PDF
Stencil the time for vanilla web components has arrived
PDF
Web components with Angular
PPTX
Angular 2 Unit Testing.pptx
PDF
Meetup SkillValue - Angular 6 : Bien démarrer son application
PDF
Night Watch with QA
PDF
Angular Unit Testing NDC Minn 2018
PDF
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
PDF
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
PDF
What is your money doing?
PDF
Angular2: Quick overview with 2do app example
PDF
Stencil: The Time for Vanilla Web Components has Arrived
PDF
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
PPTX
Creating custom Validators on Reactive Forms using Angular 6
PDF
Commit University - Exploring Angular 2
PDF
[FEConf Korea 2017]Angular 컴포넌트 대화법
PDF
Protocol-Oriented Programming in Swift
PDF
Bootiful Development with Spring Boot and Angular - RWX 2018
Building a TV show with Angular, Bootstrap, and Web Services
Itsjustangular
angular fundamentals.pdf angular fundamentals.pdf
Stencil the time for vanilla web components has arrived
Web components with Angular
Angular 2 Unit Testing.pptx
Meetup SkillValue - Angular 6 : Bien démarrer son application
Night Watch with QA
Angular Unit Testing NDC Minn 2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
What is your money doing?
Angular2: Quick overview with 2do app example
Stencil: The Time for Vanilla Web Components has Arrived
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Creating custom Validators on Reactive Forms using Angular 6
Commit University - Exploring Angular 2
[FEConf Korea 2017]Angular 컴포넌트 대화법
Protocol-Oriented Programming in Swift
Bootiful Development with Spring Boot and Angular - RWX 2018
Ad

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding

Jan 2017 - a web of applications (angular 2)

  • 1. a web of applications kasper reijnders
  • 2. 01 introduction tijd (minuten) 1-3 02 why this subject tijd (minuten) 5-10 03 summarize tijd (minuten) 2-5 04 angular tijd (minuten) 10-20 tonight
  • 13. website ○ using CMS ○ basic frontend functionality ○lightbox ○search ○sharing ○etc… ○ knmg.nl / incentro.com
  • 14. web apps ○ using content from some repository ○ single page applications ○ advanced frontend ○multiple components ○ facebook.com / twitter.com / airbnb.com
  • 15. combined ○ apps integrated in site ○ used for ‘difficult’ content / calculations / checks ○ anwb.nl / unive.nl / snsbank.nl
  • 17. angular ○ web apps ○ integrated web apps
  • 18. angular ○ version 1.x ○ version 2.x and above ○next version will be 4.x
  • 19. angular > 2.x ○ Modular ○components and services ○ TypeScript ○ Annotations
  • 22. typescript import {Goal} from "../types/goal"; export class ThemeService { private goal: Goal; constructor() { } } export class Goal { title: string; status: Array<number> | boolean; planned?: boolean; }
  • 23. typescript / es6 function test(i) { return i + 2; } let test = i => i + 2
  • 25. component import { Component } from '@angular/core'; @Component({ selector: 'batman', template: '<h1>{{name}}</h1>' }) export class BatmanComponent { name: string = 'Batman'; hasParents: boolean = false; }
  • 26. component import { Component } from '@angular/core'; @Component({ selector: 'batman', template: '<h1>{{name}}</h1>' }) export class BatmanComponent { name: string = 'Batman'; hasParents: boolean = false; }
  • 27. component import { Component } from '@angular/core'; @Component({ selector: 'batman', template: '<h1>{{name}}</h1>' }) export class BatmanComponent { name: string = 'Batman'; hasParents: boolean = false; }
  • 28. component import { Component } from '@angular/core'; @Component({ selector: 'batman', template: '<h1>{{name}}</h1>' }) export class BatmanComponent { name: string = 'Batman'; hasParents: boolean = false; }
  • 29. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 30. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 31. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 32. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 33. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 34. module import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BatmanComponent } from './batman.component'; import { BatMobileComponent } from './batmobile.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ BatmanComponent, BatMobileComponent ], bootstrap: [ BatmanComponent ] }) export class EverythingIsAwesomeApp { }
  • 35. input and output import { Component, Input } from '@angular/core'; @Component({ selector: 'batmobile', template: '<div>{{driver}}</div>' }) export class BatMobileComponent { @Input() driver: string; }
  • 36. input and output import { Component } from '@angular/core'; @Component({ selector: 'batman', template: '<batmobile [driver]="name"></batmobile>' }) export class BatmanComponent { name: string = 'Batman'; hasParents: boolean = false; }
  • 37. services import { Injectable } from '@angular/core'; import { Car } from 'car'; import { CARS } from 'CARS.MOCK'; @Injectable() export class BatmobileService { constructor() {} getCarPark(): Promise<Car[]> { return Promise.resolve(CARS); // this can be replaced with a REST call } getCarByDriver(driver: string): Promise<Car> { return this.getCarPark().then((cars) => { return cars.find(car => car.driver === driver); }); } }
  • 38. services import { Component, Input } from '@angular/core'; @Component({ selector: 'batmobile', template: '<div>{{driver}}</div>' }) export class BatMobileComponent { @Input() driver: string; }
  • 39. services import { Component, Input, OnInit } from '@angular/core'; import { BatmobileService } from 'batmobileservice'; @Component({ selector: 'batmobile', template: '<div>{{driver}}</div>' }) export class BatMobileComponent implements ngOnInit { @Input() driver: string; constructor(private batmobileService: BatmobileService) {} ngOnInit() { // ... } }
  • 40. services ... constructor(private batmobileService: BatmobileService) {} ngOnInit() { this.batmobileService.getCarByDriver(this.driver).then((car) => { this.car = car }); } ...
  • 41. pipes {{ someValue | pipe }} {{ birthday | date:'fullDate' | uppercase }} {{ users | filter: 'name' }}
  • 42. directives 1. Components 2. Structural directives 3. Attribute directives
  • 44. asterisk <p *ngIf="condition">Our heroes are true!</p> <template [ngIf]="condition"> <p>Our heroes are true!</p> </template>
  • 45. attribute directives <div [style.background]="'lime'"> some </div> <p myHighlight [highlightColor]="color"> color</p> <p [myHighlight]="color">Highlight me!</p>
  • 46. template options <input [value]="firstName"> Binds property value to the result of expression firstName. <div [attr.role]="myAriaRole"> Binds attribute role to the result of expression myAriaRole. <div [class.extra-sparkle]="isDelightful"> Binds the presence of the CSS class extra-sparkle on the element to the truthiness of the expression isDelightful. <div [style.width.px]="mySize"> Binds style property width to the result of expression mySize in pixels. Units are optional. <button (click)="readRainbow($event)"> Calls method readRainbow when a click event is triggered on this button element (or its children) and passes in the event object. <my-cmp [(title)]="name"> Sets up two-way data binding. Equivalent to: <my-cmp [title]="name" (titleChange)="name=$event">
  • 47. <p>Card No.: {{cardNumber | myCardNumberFormatter}}</p> Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter. <p>Employer: {{employer?.companyName}}</p> The safe navigation operator (?) means that the employer field is optional and if undefined, the rest of the expression should be ignored. <p>Hello {{superHero}}</p> Binds text content to an interpolated string, for example, "Hello Seabiscuit". template options
  • 49. tips use angular-cli to jumpstart development -> https://cli.angular.io/ have 1 functionality per file divide data and function make reusable components
  • 50. use folders per type - batman-project/ - src/scripts/ - components/ - directives/ - services/ - types/ - main.ts