一下子就跳到这个函数ɵɵadvance了:
/**
* Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,
* AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.
* @param {?} lView The LView where hooks are defined
* @param {?} hooks Hooks to be run
* @param {?} initPhase A phase for which hooks should be run
* @param {?=} nodeIndex 3 cases depending on the value:
* - undefined: all hooks from the array should be executed (post-order case)
* - null: execute hooks only from the saved index until the end of the array (pre-order case, when
* flushing the remaining hooks)
* - number: execute hooks only from the saved index until that node index exclusive (pre-order
* case, when executing select(number))
* @return {?}
*/
function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {
ngDevMode &&
assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');
if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
callHooks(lView, hooks, initPhase, nodeIndex);
}
}
这个NzInputGroupComponent来自:nz-input-group
如何判断当前浏览器是否支持ShadowDom:
/**
* Checks whether the user's browser support Shadow DOM.
* @return {?}
*/
function _supportsShadowDom() {
if (shadowDomIsSupported == null) {
/** @type {?} */
const head = typeof document !== 'undefined' ? document.head : null;
shadowDomIsSupported = !!(head && (((/** @type {?} */ (head))).createShadowRoot || head.attachShadow));
}
return shadowDomIsSupported;
}
要获取更多Jerry的原创文章,请关注公众号"汪子熙":