Мы уже все привыкли к angular.element API предоставляемое AngularJs, благодаря чему мы можем выбрать элемент и дальше исследовать его свойства в консоли обращаясь как :
> angular.element($0)

Более подробно тут.
Но что же может нам дать Angular2?
Мы уже все привыкли к angular.element API предоставляемое AngularJs, благодаря чему мы можем выбрать элемент и дальше исследовать его свойства в консоли обращаясь как :
> angular.element($0)

Более подробно тут.
Но что же может нам дать Angular2?
Небольшая заметка по мотивам ответа на stackoverflow.
Внедрив следующие сервисы в компонент
ApplicationRef, NgZone, ChangeDetectorRef,
мы можем добиться следующего:

Angular полностью управляет процессами происходящими в компоненте и над ним: создание, рендеринг, связывание данных и удаление. Мы в свою очередь можем вклиниться в процесс с помощью хуков/триггеров (lifecycle hooks) для каждого из событий.
Какие существуют хуки?

*UPDATED 6.06.2018*
So what should you do not to lose all the features in Visual Studio Code that you already got used to in WebStorm?
Did I miss something?

It would be really nice if we could use native ECMAScript 2015 Promises with Angular instead of $q service that is provided from box to be close to pure JavaScript:
[javascript]
//somewhere inside component controller
let promise = new Promise((resolve) => setTimeout(() => resolve(‘resolved’), 2000));
promise.then(x => this.x = x);
[/javascript]
But in this case we will have to run digest manually for each resolve(to synchronise view and model):
[javascript]
let promise = new Promise((resolve) => setTimeout(() => resolve(‘resolved’), 2000));
promise.then(x => {
$scope.apply();
this.x = x;
});
[/javascript]
But what if we hack the Promise and intercept our digest call there:
I’m just thinking how convenient could it be if we have setTimeout returning promise.
[javascript]
setTimeout(1000).then(/* … do whatever */);
[/javascript]
Let’s create our own one and call it ‘delay’ (using ES6 Promise):
If you are using latest version of ui-router (now it’s 1.0.0-alpha) you probably already noticed that there are no events that we all got used to: $stateChangeCancel, $stateChangeError, $stateChangeStart, $stateChangeSuccess, $stateNotFound. All of them are deprecated in 1.0.0-alpha.3 and you can not use them anymore in 1.0.0-alpha.5.
If you want to move to new version of ui-router you should make such changes:
That’s what we all have been waiting for ages

In version 1.0.0alpha0 they finally make it possible! Child for abstract states? No! But now at least it’s possible to create own fix for it due to new $transitionsProvider, in which you could define onBefore hook. You can change the behaviour depends on state options. Let’s use “abstract” property that is boolean and extend it: to make it possible to add child state here:
[javascript]
$transitionsProvider.onBefore({
to: state => !!state.abstract
}, ($transition$, $state) => {
if (angular.isString($transition.to().abstract)) {
return $state.target($transition.to().abstract);
}
});
[/javascript]
basically if abstract param is a string we set it like a target. Example of use:
[javascript]
.state({
name: ‘abstract2’,
url: ‘/abstract2’,
abstract: ‘abstract2.foo’, // redirect to ‘abstract2.foo’
template: ‘abstract2’
})
[/javascript]