×
@MartinaKraus11
Time to interact
Initial loading time
Developing / Build time
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
GDE in Angular and Web Technologies
Trainer and Consultant
Women Techmakers Ambassador
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
Angular
declarative Code
ngc
JavaScript Code
@MartinaKraus11
export class AppCmp { title: string;
ɵcmp = core.defineComponent( {...}) }
ngc
@Component({ selector: ‘app-component’ template: `<h1>{{ title }}</h1>` }) export class AppCmp {}
@MartinaKraus11
Scoping (ngModules)
Evaluation of
Property chains
Variables / function calls
Type checking
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
> ng new awesome-app
> ngc
@MartinaKraus11
// 9.1.2
> ng new awesome-app
> ngc
ViewEngine:
1,3MB
Ivy:
14kB
@MartinaKraus11
@MartinaKraus11
app.cmp.ts
app.cmp.html
app.cmp.scss
app.cmp.js
app.cmp.ngFactory.js
app.cmp.metadata.json
app.cmp.ngsummary.json
@MartinaKraus11
app.cmp.ts
app.cmp.html
app.cmp.scss
app.cmp.js
@MartinaKraus11
@MartinaKraus11
Hello World
@MartinaKraus11
Hello World
'Hello World'
@MartinaKraus11
@MartinaKraus11
export function elementStart()
export function text()
Ivy instructions
Unsused Code
export function pipe()
@MartinaKraus11
static ɵcmp = core.ɵɵdefineComponent({…})
app.component.js
@MartinaKraus11
Component has all information for being compiled
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
@MartinaKraus11
Separate compilation of dependencies
No global compilation anymore
Modules already AOT
@MartinaKraus11
Cleaner API
Improvement of Stack Trace
Template creation in one file with controller code
@MartinaKraus11
Kara Erickson - https://bit.ly/3bgD3C9
@MartinaKraus11
@MartinaKraus11
Angular provides two compilers:
Ngtsc (Ivy compiler): compiles Ivy-compatible code
Ngcc (Compatibility Compiler): Convert old style modules
@MartinaKraus11
@MartinaKraus11
tsconfig.json:
//to Opt-out:
"angularCompilerOptions": {
"enableIvy": false
}
Ivy reduces the bundle size significantly
Only re-compiles what changes
Backwards compatible with ngcc
@MartinaKraus11
me@martina-kraus.io
@MartinaKraus11
martina-kraus.io
Ping me:
Slides: slides.com/martinakraus/ivy-rise