v8.2.13
v9.0.0 RC.1
# update the CLI tool
ng update @angular/cli
# update the core
ng update @angular/core
# start your app
ng serve
debugger / breakpoints
$0
debug()
option + cmd + f
monitor / monitorEvents
// in AngularJS?
// remember this?
window.angular...
angular.element();
angular.element().scope();
angular.element().injector();
angular.element()
.scope().$apply();
// Angular Ivy
// brings it back via
window.ng...
if (ngDevMode) {
// Angular adds extra
// code into the framework
// so that additional
// tooling and info can
// have more info about
// data-structures...
}
// .debug is appended
someObject.debug
someArray.debug
someDataStructure.debug
const enum UserIndex {
FirstNamePosition = 0,
LastNamePosition = 1,
AgePosition = 2
}
interface User extends Array<number|string> {
[UserIndex.FirstNamePosition]: string;
[UserIndex.LastNamePosition]: string;
[UserIndex.AgePosition]: number;
}
function getFullName(user: User) {
return user[UserIndex.FirstNamePosition] +
user[UserIndex.LastNamePosition];
}
function isOlderThan(user: User, age: number) {
return user[UserIndex.AgePosition] > age;
}
function g(u) {
return u[0] + u[1]
}
function i(u, n) {
return u[2] > n
}
Oh No!!
It's Over!