Wassim Chegham PRO
Senior Developer Advocate @Microsoft ★ Angular contributor ★ Bazel contributor ★ GDE @Google ★ creator of @itsjustangular / hueaction.dev / ngx.tools / xlayers.dev / angular.run / thundr.dev
Dublin, Ireland – 2019
WASSIM CHEGHAM – @manekinekko
Klingon
(author)
xLayers.dev
(author)
Angular Core Team
Compodoc
(co-author)
Universal
(Alumni.)
ngx.tools
(author)
Node.js Foundation Invited Member
npm install -g @angular-devkit/schematics-cli
schematics blank --name=foo
CREATE /foo/README.md (639 bytes)
CREATE /foo/.gitignore (191 bytes)
CREATE /foo/.npmignore (64 bytes)
CREATE /foo/package.json (540 bytes)
CREATE /foo/tsconfig.json (656 bytes)
CREATE /foo/src/collection.json (205 bytes)
CREATE /foo/src/foo/index.ts (310 bytes)
CREATE /foo/src/foo/index_spec.ts (456 bytes)
"
"
<!-- For modern browsers -->
<script type="module" src="polyfills-es2015.js"></script>
<script type="module" src="runtime-es2015.js"></script>
<script type="module" src="style-es2015.js"></script>
<script type="module" src="vendor-es2015.js"></script>
<script type="module" src="main-es2015.js"></script>
<!-- For Legacy browsers -->
<script nomodule src="polyfills-es5.js"></script>
<script nomodule src="runtime-es5.js"></script>
<script nomodule src="style-es5.js"></script>
<script nomodule src="vendor-es5.js"></script>
<script nomodule src="main-es5.js"></script>
* +10 years old.
# For new apps
npm install -g @angular/bazel
ng new my-app --collection=@angular/bazel
ng build
# For existing apps
ng add @angular/bazel
ng build
Android, C & C++, C#, D, Docker, Go, Groovy, Kotlin, iOS, Java, JavaScript, Jsonnet, Objective, OCaml, C, Proto Buffers, Python, Rust, Sass, Scala, Shell, TypeScript, etc...
Angular
Components
W3C
Custom
Elements
import { Component } from '@angular/core';
import { createCustomElement } from '@angular/elements';
import { PopupComponent } from './popup.component';
@Component({
selector: 'app-root',
template: `
<h1>My Custom Element</h1>
`,
})
export class AppComponent {
constructor() {
// Convert `PopupComponent` to a custom element.
const PopupElement = createCustomElement(PopupComponent);
// Register the custom element with the browser.
customElements.define('popup-element', PopupElement);
}
}
ng generate web-worker app
CREATE tsconfig.worker.json (212 bytes)
CREATE src/app/app.worker.ts (157 bytes)
UPDATE src/tsconfig.app.json (192 bytes)
UPDATE angular.json (3893 bytes)
UPDATE src/app/app.component.ts (593 bytes)
# Before
{
path: 'home',
loadChildren: 'home/home.module#HomeModule'
},
# After
{
path: 'home',
loadChildren: () => import('home/home.module').then(m => m.HomeModule)
},
npm i -g @angular/cli@next
ng new shiny-ivy-app
36kb
7.3kb
2.7kb
Ivy minified
Ivy compressed
Today (compressed – no zone.js)
10kb
Initial target
npm i -g @angular/cli@next
# OR
ng update @angular/cli @angular/core --next
# OR for Angular version 8
ng new shiny-app --enable-ivy
By Wassim Chegham
The Angular CLI has made creating and managing Angular apps a breeze. And it does not stop there. Want to have a glimpse into what Angular has in store for the future? In this talk, we will learn about Bazel and how the new build system works, what the Angular DevKit is, how to customize the CLI with Schematics and Builders and much more.
Senior Developer Advocate @Microsoft ★ Angular contributor ★ Bazel contributor ★ GDE @Google ★ creator of @itsjustangular / hueaction.dev / ngx.tools / xlayers.dev / angular.run / thundr.dev