SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Angular 5
has arrived…
Bartłomiej Narożnik
Bartłomiej Narożnik - Angular 5 2
Patch: 4.4.6
- No Features, No Breaking Changes
Minor: 4.4.0
- New Features, No Breaking Changes
Major: 5.0.0
- New Features, Potential Breaking Changes
Bartłomiej Narożnik - Angular 5 3
1. Marking parts of your application as pure.
2. Removing angular decorators from runtime code.
Enabled by default for CLI production build.
--no-build-optimizer
Bartłomiej Narożnik - Angular 5 4
Angular compiler as a TypeScript transform (TS 2.3)
40% faster builds
(95% for angular.io 40s -> <2s)
ng serve –aot
Bartłomiej Narożnik - Angular 5 5
ServerTransferStateModule
BrowserTransferStateModule
Bartłomiej Narożnik - Angular 5 6
• Support more DOM manipulations out of the box within server
side contexts
• Improved support for 3rd party JS and Component libraries
that aren’t server-side aware
Bartłomiej Narożnik - Angular 5 7
@Component({
provider: [{provide: SOME_TOKEN, useFactory: () => null}]
})
export class MyComponent { }
@Component({
provider: [{provide: SOME_TOKEN, useValue: SomeEnum.OK}]
})
export class MyComponent { }
Bartłomiej Narożnik - Angular 5 8
//Before
ReflectiveInjector.resolveAndCreate(providers);
//After
Injector.create(providers);
Bartłomiej Narożnik - Angular 5 9
platformBrowserDynamic()
.bootstrapModule(
AppModule,
{ngZone: 'noop'})
.then( ref => {} );
Bartłomiej Narożnik - Angular 5 10
Bartłomiej Narożnik - Angular 5 11
fullTemplateTypeCheck option
<div>{{ 11.1 | lowercase }}</div>
-> Argument of type '11.1' is not assignable to parameter of type 'string'
<input [(ngModel)]="book.title" required #bookCtrl="ngModel">
<div *ngIf="bookCtrl.hasEror('required')">Title required</div>
-> Property 'hasEror' does not exist on type 'NgModel'. Did you mean 'hasError'?
Bartłomiej Narożnik - Angular 5 12
platformBrowserDynamic().bootstrapModule(AppModule, {
preserveWhitespaces: false
});
@Component({
selector: 'my',
templateUrl: './my.component.html',
preserveWhitespaces: false
})
export class MyComponent { ... }
Bartłomiej Narożnik - Angular 5 13
<div ngPreserveWhitespaces>
whitespaces preserved here
<span> and here </span>
</div>
<a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
<a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
Bartłomiej Narożnik - Angular 5 14
• <pre> tags are not affected 
• Defaults to true… for now.
• Removes about 6% of generated code
Bartłomiej Narożnik - Angular 5 15
Bartłomiej Narożnik - Angular 5 16
• Typed Response body access
• JSON as default (no need to parse)
• Interceptors
• Immutable Request/Response
• Progress Events
• Better Unit Testing
Bartłomiej Narożnik - Angular 5 17
@angular/http module officially deprecated
replaced by @angular/common/http
HttpHeaders and HttpParams accept object literals
Bartłomiej Narożnik - Angular 5 18
// using classes
const headers = new HttpHeaders().set('X-Option', 'true');
http.get(url, { headers });
const params = new HttpParams().set('test', 'true');
http.get(url, { params });
// without classes
http.get(url, { headers: {'X-Option': 'true'} });
http.get(url, { params: {'test': 'true'} });
Bartłomiej Narożnik - Angular 5 19
Bartłomiej Narożnik - Angular 5 20
GuardsCheckStart, GuardsCheckEnd
ActivationStart, ActivationEnd
ResolveStart, ResolveEnd
ChildActivationStart, ChildActivationEnd
Bartłomiej Narożnik - Angular 5 21
class MyComponent {
constructor(public router: Router, spinner: Spinner) {
router.events.subscribe(e => {
if (e instanceof ChildActivationStart) {
spinner.start(e.route);
} else if (e instanceof ChildActivationEnd) {
spinner.end(e.route);
}
});
}
}
Bartłomiej Narożnik - Angular 5 22
@NgModule({
providers: [
RouterModule.forRoot(routes, {
onSameUrlNavigation: 'reload'
}
)
]
})
*Scheduled for 5.1
Bartłomiej Narożnik - Angular 5 23
Bartłomiej Narożnik - Angular 5 24
Caching
• static assets
• external resources
• route redirection
• dynamic content
Strategies
• freshness
• performance
Bartłomiej Narożnik - Angular 5 25
import { SwPush } from '@angular/service-worker';
subscribeToPush() {
// Requesting messaging service to subscribe current client (browser)
this.swPush
.requestSubscription({ serverPublicKey: this.VAPID_PUBLIC_KEY })
.then(pushSubscription => {
// Passing subscription object to our backend
this.pushService.addSubscriber(pushSubscription)
.subscribe(
res => {
console.log('[App] Add subscriber request answer', res);
}
);
});
}
Bartłomiej Narożnik - Angular 5 26
import { SwUpdate } from '@angular/service-worker';
this.swUpdate.checkForUpdate()
.then(() => {
console.log('[App] checkForUpdate completed')
})
this.swUpdate.activateUpdate()
.then(() => {
console.log('[App] activateUpdate completed')
this.winRef.nativeWindow.location.reload()
})
Bartłomiej Narożnik - Angular 5 28
• Angular now uses data from Common Locale Data Repository
(CLDR) instead.
• No need for intl polyfil
• Old pipes in DeprecatedI18NPipesModule
• Locale parameter in all i18n pipes
• Default locale en-US
Bartłomiej Narożnik - Angular 5 29
import {LOCALE_ID} from '@angular/core';
import {registerLocaleData} from '@angular/common';
import localePl from '@angular/common/locales/pl-PL';
registerLocaleData(localePl);
@NgModule({
...
providers: [
{ provide: LOCALE_ID, useValue: 'pl-PL' },
]
...
})
Bartłomiej Narożnik - Angular 5 30
• New formats (long, longDate, longTime, full, fullDate, fullTime)
• Timezone support
• Locale support
<!-- common usage using pre-defined format string -->
<span>{{ d | date: 'shortDate' }}</span> <!-- en-US: 1/18/17 -->
<!-- specific locale -->
<span>{{ d | date: 'shortDate': null: 'pl' }}</span> <!-- pl-PL: 18/1/17 -->
<!-- custom format string -->
<span>{{ d | date: 'M/d/yy': null: 'pl' }}</span> <!-- pl-PL: 18/1/17 -->
Bartłomiej Narożnik - Angular 5 31
Field type Format Example value v4 v5
Eras Narrow A for AD G GGGGG
Months Narrow S for September L MMMMM
Week day Narrow M for Monday E EEEEE
Timezone Long location
Pacific Standard
Time
z Not available
Timezone Long GMT GMT+01:00 Z ZZZZ
Bartłomiej Narożnik - Angular 5 32
Bartłomiej Narożnik - Angular 5 33
<input name="title" ngModel [ngModelOptions]="{updateOn: 'blur'}">
<form [ngFormOptions]="{updateOn: 'submit'}">
Bartłomiej Narożnik - Angular 5 34
new FormGroup(value, {updateOn: 'blur'}));
new FormControl(value, {updateOn: 'blur',
asyncValidators: [myValidator]})
Bartłomiej Narożnik - Angular 5 35
Bartłomiej Narożnik - Angular 5 36
animations: [
trigger('query', [
transition(
'* => start',
[
query(
'.item',
[style({ opacity: 0 }), animate('2s', style({ opacity: 1 }))],
{ limit: -3 }
),
]),
]),
]
Bartłomiej Narożnik - Angular 5 37
//Before
transition('0 => 1, 1 => 2, 2 => 3, 3 => 4', ...)
//After
transition(':increment')
Bartłomiej Narożnik - Angular 5 38
export const expandTypo = [
trigger('expandTypo', [
transition(':leave', [
animate('150ms cubic-bezier(0.4, 0.0, 1, 1)', style({
height: 0,
opacty: 0 // <-- typo here, could also be anything random
}))
])
])
];
Bartłomiej Narożnik - Angular 5 39
//Before
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/filter';
shortTitles = allBooks
.map(book => book.title)
.filter(title => title.length < 20);
//After
import { Observable } from 'rxjs/Observable';
import { map, filter } from 'rxjs/operators';
shortTitles = allBooks.pipe(
map(book => book.title),
filter(title => title.length < 20),
);
Bartłomiej Narożnik - Angular 5 40
• Weekly patch version
• Monthly minor version
• Major version every 6 months (backwards compatible)
• Almost 9000 commits in total
• ~9 commits per day (1932 commits between versions 4 and
5)
Bartłomiej Narożnik - Angular 5 41
Bartłomiej Narożnik - Angular 5 42
@bart_naroznik
Bartłomiej Narożnik - Angular 5 43
No matter
how impressive the lift-off
is,
it’s the landing that counts..

Weitere ähnliche Inhalte

Was ist angesagt?

Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir Kaufman
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian MüllerSebastian Holstein
 
Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Ahmed Moawad
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation Phan Tuan
 
Angular 4 Introduction Tutorial
Angular 4 Introduction TutorialAngular 4 Introduction Tutorial
Angular 4 Introduction TutorialScott Lee
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework Yakov Fain
 
Exploring Angular 2 - Episode 1
Exploring Angular 2 - Episode 1Exploring Angular 2 - Episode 1
Exploring Angular 2 - Episode 1Ahmed Moawad
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Naveen Pete
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2Maurice De Beijer [MVP]
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Sumanth Chinthagunta
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2Dor Moshe
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
Angular2 with TypeScript
Angular2 with TypeScript Angular2 with TypeScript
Angular2 with TypeScript Rohit Bishnoi
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppKaty Slemon
 
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...Katy Slemon
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersPaweł Żurowski
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?jbandi
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2INader Debbabi
 

Was ist angesagt? (20)

Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
 
Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2Exploring Angular 2 - Episode 2
Exploring Angular 2 - Episode 2
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
 
Angular 4 Introduction Tutorial
Angular 4 Introduction TutorialAngular 4 Introduction Tutorial
Angular 4 Introduction Tutorial
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Exploring Angular 2 - Episode 1
Exploring Angular 2 - Episode 1Exploring Angular 2 - Episode 1
Exploring Angular 2 - Episode 1
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Angular2 with TypeScript
Angular2 with TypeScript Angular2 with TypeScript
Angular2 with TypeScript
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular App
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
How to Implement Basic Angular Routing and Nested Routing With Params in Angu...
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 

Ähnlich wie Angular 5

Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...Paweł Żurowski
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3Luciano Mammino
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...OdessaJS Conf
 
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)Kasper Reijnders
 
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...Fwdays
 
Angular 2 Unit Testing.pptx
Angular 2 Unit Testing.pptxAngular 2 Unit Testing.pptx
Angular 2 Unit Testing.pptxaccordv12
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and SymfonyIgnacio Martín
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSYoann Gotthilf
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsLoiane Groner
 
Angular 16 – the rise of Signals
Angular 16 – the rise of SignalsAngular 16 – the rise of Signals
Angular 16 – the rise of SignalsCoding Academy
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Alessandro Molina
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesDavid Giard
 
How to create an Angular builder
How to create an Angular builderHow to create an Angular builder
How to create an Angular builderMaurizio Vitale
 
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.VitaliyMakogon
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 
はじめてのAngular2
はじめてのAngular2はじめてのAngular2
はじめてのAngular2Kenichi Kanai
 
2016 W3C Conference #4 : ANGULAR + ES6
2016 W3C Conference #4 : ANGULAR + ES62016 W3C Conference #4 : ANGULAR + ES6
2016 W3C Conference #4 : ANGULAR + ES6양재동 코드랩
 
Angular 1 + es6
Angular 1 + es6Angular 1 + es6
Angular 1 + es6장현 한
 

Ähnlich wie Angular 5 (20)

Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...Architecture for scalable Angular applications (with introduction and extende...
Architecture for scalable Angular applications (with introduction and extende...
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
 
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)
 
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
 
Angular 2 Unit Testing.pptx
Angular 2 Unit Testing.pptxAngular 2 Unit Testing.pptx
Angular 2 Unit Testing.pptx
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and Symfony
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applications
 
Angular 16 – the rise of Signals
Angular 16 – the rise of SignalsAngular 16 – the rise of Signals
Angular 16 – the rise of Signals
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
How to create an Angular builder
How to create an Angular builderHow to create an Angular builder
How to create an Angular builder
 
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.
Vitaliy Makogon: Migration to ivy. Angular component libraries with IVY support.
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
はじめてのAngular2
はじめてのAngular2はじめてのAngular2
はじめてのAngular2
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
[W3C HTML5 2016] Angular + ES6
[W3C HTML5 2016] Angular + ES6[W3C HTML5 2016] Angular + ES6
[W3C HTML5 2016] Angular + ES6
 
2016 W3C Conference #4 : ANGULAR + ES6
2016 W3C Conference #4 : ANGULAR + ES62016 W3C Conference #4 : ANGULAR + ES6
2016 W3C Conference #4 : ANGULAR + ES6
 
Angular 1 + es6
Angular 1 + es6Angular 1 + es6
Angular 1 + es6
 

Kürzlich hochgeladen

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Kürzlich hochgeladen (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

Angular 5

  • 2. Bartłomiej Narożnik - Angular 5 2 Patch: 4.4.6 - No Features, No Breaking Changes Minor: 4.4.0 - New Features, No Breaking Changes Major: 5.0.0 - New Features, Potential Breaking Changes
  • 3. Bartłomiej Narożnik - Angular 5 3 1. Marking parts of your application as pure. 2. Removing angular decorators from runtime code. Enabled by default for CLI production build. --no-build-optimizer
  • 4. Bartłomiej Narożnik - Angular 5 4 Angular compiler as a TypeScript transform (TS 2.3) 40% faster builds (95% for angular.io 40s -> <2s) ng serve –aot
  • 5. Bartłomiej Narożnik - Angular 5 5 ServerTransferStateModule BrowserTransferStateModule
  • 6. Bartłomiej Narożnik - Angular 5 6 • Support more DOM manipulations out of the box within server side contexts • Improved support for 3rd party JS and Component libraries that aren’t server-side aware
  • 7. Bartłomiej Narożnik - Angular 5 7 @Component({ provider: [{provide: SOME_TOKEN, useFactory: () => null}] }) export class MyComponent { } @Component({ provider: [{provide: SOME_TOKEN, useValue: SomeEnum.OK}] }) export class MyComponent { }
  • 8. Bartłomiej Narożnik - Angular 5 8 //Before ReflectiveInjector.resolveAndCreate(providers); //After Injector.create(providers);
  • 9. Bartłomiej Narożnik - Angular 5 9 platformBrowserDynamic() .bootstrapModule( AppModule, {ngZone: 'noop'}) .then( ref => {} );
  • 10. Bartłomiej Narożnik - Angular 5 10
  • 11. Bartłomiej Narożnik - Angular 5 11 fullTemplateTypeCheck option <div>{{ 11.1 | lowercase }}</div> -> Argument of type '11.1' is not assignable to parameter of type 'string' <input [(ngModel)]="book.title" required #bookCtrl="ngModel"> <div *ngIf="bookCtrl.hasEror('required')">Title required</div> -> Property 'hasEror' does not exist on type 'NgModel'. Did you mean 'hasError'?
  • 12. Bartłomiej Narożnik - Angular 5 12 platformBrowserDynamic().bootstrapModule(AppModule, { preserveWhitespaces: false }); @Component({ selector: 'my', templateUrl: './my.component.html', preserveWhitespaces: false }) export class MyComponent { ... }
  • 13. Bartłomiej Narożnik - Angular 5 13 <div ngPreserveWhitespaces> whitespaces preserved here <span> and here </span> </div> <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a> <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
  • 14. Bartłomiej Narożnik - Angular 5 14 • <pre> tags are not affected  • Defaults to true… for now. • Removes about 6% of generated code
  • 15. Bartłomiej Narożnik - Angular 5 15
  • 16. Bartłomiej Narożnik - Angular 5 16 • Typed Response body access • JSON as default (no need to parse) • Interceptors • Immutable Request/Response • Progress Events • Better Unit Testing
  • 17. Bartłomiej Narożnik - Angular 5 17 @angular/http module officially deprecated replaced by @angular/common/http HttpHeaders and HttpParams accept object literals
  • 18. Bartłomiej Narożnik - Angular 5 18 // using classes const headers = new HttpHeaders().set('X-Option', 'true'); http.get(url, { headers }); const params = new HttpParams().set('test', 'true'); http.get(url, { params }); // without classes http.get(url, { headers: {'X-Option': 'true'} }); http.get(url, { params: {'test': 'true'} });
  • 19. Bartłomiej Narożnik - Angular 5 19
  • 20. Bartłomiej Narożnik - Angular 5 20 GuardsCheckStart, GuardsCheckEnd ActivationStart, ActivationEnd ResolveStart, ResolveEnd ChildActivationStart, ChildActivationEnd
  • 21. Bartłomiej Narożnik - Angular 5 21 class MyComponent { constructor(public router: Router, spinner: Spinner) { router.events.subscribe(e => { if (e instanceof ChildActivationStart) { spinner.start(e.route); } else if (e instanceof ChildActivationEnd) { spinner.end(e.route); } }); } }
  • 22. Bartłomiej Narożnik - Angular 5 22 @NgModule({ providers: [ RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' } ) ] }) *Scheduled for 5.1
  • 23. Bartłomiej Narożnik - Angular 5 23
  • 24. Bartłomiej Narożnik - Angular 5 24 Caching • static assets • external resources • route redirection • dynamic content Strategies • freshness • performance
  • 25. Bartłomiej Narożnik - Angular 5 25 import { SwPush } from '@angular/service-worker'; subscribeToPush() { // Requesting messaging service to subscribe current client (browser) this.swPush .requestSubscription({ serverPublicKey: this.VAPID_PUBLIC_KEY }) .then(pushSubscription => { // Passing subscription object to our backend this.pushService.addSubscriber(pushSubscription) .subscribe( res => { console.log('[App] Add subscriber request answer', res); } ); }); }
  • 26. Bartłomiej Narożnik - Angular 5 26 import { SwUpdate } from '@angular/service-worker'; this.swUpdate.checkForUpdate() .then(() => { console.log('[App] checkForUpdate completed') }) this.swUpdate.activateUpdate() .then(() => { console.log('[App] activateUpdate completed') this.winRef.nativeWindow.location.reload() })
  • 27.
  • 28. Bartłomiej Narożnik - Angular 5 28 • Angular now uses data from Common Locale Data Repository (CLDR) instead. • No need for intl polyfil • Old pipes in DeprecatedI18NPipesModule • Locale parameter in all i18n pipes • Default locale en-US
  • 29. Bartłomiej Narożnik - Angular 5 29 import {LOCALE_ID} from '@angular/core'; import {registerLocaleData} from '@angular/common'; import localePl from '@angular/common/locales/pl-PL'; registerLocaleData(localePl); @NgModule({ ... providers: [ { provide: LOCALE_ID, useValue: 'pl-PL' }, ] ... })
  • 30. Bartłomiej Narożnik - Angular 5 30 • New formats (long, longDate, longTime, full, fullDate, fullTime) • Timezone support • Locale support <!-- common usage using pre-defined format string --> <span>{{ d | date: 'shortDate' }}</span> <!-- en-US: 1/18/17 --> <!-- specific locale --> <span>{{ d | date: 'shortDate': null: 'pl' }}</span> <!-- pl-PL: 18/1/17 --> <!-- custom format string --> <span>{{ d | date: 'M/d/yy': null: 'pl' }}</span> <!-- pl-PL: 18/1/17 -->
  • 31. Bartłomiej Narożnik - Angular 5 31 Field type Format Example value v4 v5 Eras Narrow A for AD G GGGGG Months Narrow S for September L MMMMM Week day Narrow M for Monday E EEEEE Timezone Long location Pacific Standard Time z Not available Timezone Long GMT GMT+01:00 Z ZZZZ
  • 32. Bartłomiej Narożnik - Angular 5 32
  • 33. Bartłomiej Narożnik - Angular 5 33 <input name="title" ngModel [ngModelOptions]="{updateOn: 'blur'}"> <form [ngFormOptions]="{updateOn: 'submit'}">
  • 34. Bartłomiej Narożnik - Angular 5 34 new FormGroup(value, {updateOn: 'blur'})); new FormControl(value, {updateOn: 'blur', asyncValidators: [myValidator]})
  • 35. Bartłomiej Narożnik - Angular 5 35
  • 36. Bartłomiej Narożnik - Angular 5 36 animations: [ trigger('query', [ transition( '* => start', [ query( '.item', [style({ opacity: 0 }), animate('2s', style({ opacity: 1 }))], { limit: -3 } ), ]), ]), ]
  • 37. Bartłomiej Narożnik - Angular 5 37 //Before transition('0 => 1, 1 => 2, 2 => 3, 3 => 4', ...) //After transition(':increment')
  • 38. Bartłomiej Narożnik - Angular 5 38 export const expandTypo = [ trigger('expandTypo', [ transition(':leave', [ animate('150ms cubic-bezier(0.4, 0.0, 1, 1)', style({ height: 0, opacty: 0 // <-- typo here, could also be anything random })) ]) ]) ];
  • 39. Bartłomiej Narożnik - Angular 5 39 //Before import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/filter'; shortTitles = allBooks .map(book => book.title) .filter(title => title.length < 20); //After import { Observable } from 'rxjs/Observable'; import { map, filter } from 'rxjs/operators'; shortTitles = allBooks.pipe( map(book => book.title), filter(title => title.length < 20), );
  • 40. Bartłomiej Narożnik - Angular 5 40 • Weekly patch version • Monthly minor version • Major version every 6 months (backwards compatible) • Almost 9000 commits in total • ~9 commits per day (1932 commits between versions 4 and 5)
  • 41. Bartłomiej Narożnik - Angular 5 41
  • 42. Bartłomiej Narożnik - Angular 5 42
  • 43. @bart_naroznik Bartłomiej Narożnik - Angular 5 43 No matter how impressive the lift-off is, it’s the landing that counts..

Hinweis der Redaktion

  1. During the Tree Shake portion of the AOT compilation, the application’s dependency graph is walked to determine what parts of the JavaScript code are unused. Thus, if a pure function’s result isn’t used, the function may be safely removed. Because Decorators are consumed during the compilation process, after compilation, they may be removed to reduce code size.
  2. TypeScript transforms were a new feature introduced as part of TypeScript 2.3 that allows to hook into the standard TypeScript compilation pipeline. You can take advantage of this by running ng serve with the AOT flag turned on. This will become the default in a future release of the CLI. There are some known speed issues with projects with more than a thousand components. Angular team wants to be sure projects of all sizes will experience these improvements. It’s a CLI feature so can be turned on independently.
  3. Angular Universal is a project focused on helping developers to perform server side rendering (SSR) of Angular applications. By rendering on the server and then bootstrapping on top of the generated HTML, you can add support for scrapers and crawlers that don’t support JavaScript, and you increase the perceived performance of your application. ServerTransferStateModule and BrowserTransferStateModule allows to generate information as part of rendering with platform-server, and then transfer to the client side. So that this information does not need to be regenerated. Useful for cases such as when your application fetches data over HTTP. By transferring state from the server, this means developers do not need to make a second HTTP request once the application makes it to the client. Documentation for state transfer is forthcoming in the next few weeks.
  4. Angular Universal platform-server now works with Domino
  5. Expression lowering in decorators for lambdas and the value of useValue, useFactory and data in object literals Allows to use values that can only be calculated at runtime in decorators for expressions that are lowered. Lambda can be used instead of a named function
  6. Static injector no longer requires the Reflect polyfill, reducing application size for most developers.
  7. Zones are used to automatically trigger change detections as a result of asynchronous operations. Change detection is a separate mechanism – can work without zones. Zones are faster by default, but it’s now possible to bypass zones for performance focused applications.
  8. It can for example catch that a pipe is not used with the proper type. It can also analyze the local variables referencing a directive in your templates. Right now the default value of fullTemplateTypeCheck is false, but we can expect to see it become true in a future release. (Side note: this feature is currently a bit flaky, and I ran into issues testing it. You might want to wait 5.0.x to try it!).
  9. Angular 4.4.1 (September 18th)
  10. Introduced in 4.3 Typed, synchronous response body access, including support for JSON body types JSON is an assumed default and no longer needs to be explicitly parsed Interceptors allow middleware logic to be inserted into the pipeline Immutable request/response objects Progress events for both request upload and response download Post-request verification & flush based testing framework
  11. An example of using these events to start/stop a spinner
  12. It’s now possible to reload a page when the router receives a request to navigate to the same URL. Until now it was ignoring such a request, making it impossible to build a “refresh” button. It’s now configurable at the router level, using onSameUrlNavigation, which can receive either reload or ignore (currently the default).
  13. No support in CLI yet. Planned for 1.6.
  14. cache your static assets by default. download only what has changed when you deploy a new version, allowing blazingly fast application start! it can go further, allowing to cache external resources (like fonts, icons from a CDN…), route redirection and even dynamic content caching (like calls to your API), with different strategies possible (always fetch for fresh data, or always serve from cache for speed…). Really smart network optimizations, requiring only some JSON configuration from us. No support in CLI yet. Planned for 1.6.
  15. We can subscribe to push notification as well as send them. No support in CLI yet. Planned for 1.6.
  16. download only what has changed when you deploy a new version, allowing blazingly fast application start! The user workflow should not be interrupted by the unexpectedly updated application. The app version in the opened browser tab will remain the same until the tab close. NGSW should keep app integrity. If any single file in application distributive was updated, we treat the whole corresponding version as a new one.
  17. The Intl API from @angular/common has been removed to improve browser support. Intl API is not needed anymore, we extract and use data from Common Locale Data Repository (CLDR) instead. 
  18. The Intl API from @angular/common has been removed to improve browser support. Intl API is not needed anymore, we extract and use data from Common Locale Data Repository (CLDR) instead. 
  19. Animation queries now support negative limits, in which case will be matching elements from the end rather than from the beginning. Here’s an example showing limiting the last 3 elements with class “item”:
  20. Let’s say you want to animate a carousel with 5 elements, with a nice animation based on the index of the element displayed. You had to declare a transition like: transition('0 => 1, 1 => 2, 2 => 3, 3 => 4', ...). With Angular 5, you can now use transition(':increment')!
  21. These new operators eliminate the side effects and the code splitting / tree shaking problems that existed with the previous ‘patch’ method of importing operators.
  22. Over 500 contriubutors 2 big companies