@willgmbr
X . Y . Z
MAJOR MINOR PATCH
$ ng update
$ ng update @angular/cli @angular/core
// some-lib.js
export function someFun () {
...
}
export function unusedFun () {
...
}
// index.js
import { someFun } from './some-lib'
function main() {
someFun();
}
main();
// some-lib.js
export function someFun () {
...
}
export function unusedFun () {
...
}
// index.js
import { someFun, unusedFun } from './some-lib'
function main(x) {
someFun();
if(x) {
unusedFun();
}
}
main(false);
Template Data
Template HTML
Interpreter
DOM
AOT
Build Time
App Execution Time
viewDef([
elementDef(0, 'div', ['class', 'menu'], null, ...),
textDef('Hello World!', ...)
])
function createViewNodes(view: ViewDef) {
view.nodes.forEach(node => {
if (node.isElementDef) elementStart(node);
if (node.hasLis) listener(node);
...
})
}
Template HTML
Instructions
DOM
AOT
Build Time
App Execution Time
<div class="menu">
Hello World!
</div>
import { elementStart, text } from '@angular/core';
elementStart(0, 'div', ['class', 'menu']);
text(1, 'Hello World!');
Angular Hello world app minified uncompressed
ng new my-app --enable-ivy
🎉🎉🎉
main.js
chunk_0.js
chunk_1.js
/home
/about
/cart
main.js
chunk_0.js
chunk_1.js
shell.js
nav-bar.js
cart.js