@@ -23,17 +23,17 @@ import {
2323 markRNodeAsSkippedByHydration ,
2424 setSegmentHead ,
2525} from '../../hydration/utils' ;
26- import { assertDefined , assertEqual } from '../../util/assert' ;
26+ import { assertDefined } from '../../util/assert' ;
27+ import { assertTNodeCreationIndex } from '../assert' ;
2728import { clearElementContents , createElementNode } from '../dom_node_manipulation' ;
2829import { hasClassInput , hasStyleInput , TNode , TNodeType } from '../interfaces/node' ;
2930import { RElement } from '../interfaces/renderer_dom' ;
30- import { isComponentHost , isDirectiveHost } from '../interfaces/type_checks' ;
31- import { HYDRATION , LView , RENDERER , TView } from '../interfaces/view' ;
31+ import { isComponentHost } from '../interfaces/type_checks' ;
32+ import { HYDRATION , LView , RENDERER , TVIEW , TView } from '../interfaces/view' ;
3233import { assertTNodeType } from '../node_assert' ;
3334import {
3435 decreaseElementDepthCount ,
3536 enterSkipHydrationBlock ,
36- getBindingIndex ,
3737 getBindingsEnabled ,
3838 getCurrentTNode ,
3939 getLView ,
@@ -70,13 +70,9 @@ export function ɵɵelementStart(
7070 localRefsIndex ?: number ,
7171) : typeof ɵɵelementStart {
7272 const lView = getLView ( ) ;
73- const tView = getTView ( ) ;
74- ngDevMode &&
75- assertEqual (
76- getBindingIndex ( ) ,
77- tView . bindingStartIndex ,
78- 'elements should be created before any bindings' ,
79- ) ;
73+
74+ ngDevMode && assertTNodeCreationIndex ( lView , index ) ;
75+
8076 const tNode = elementLikeStartShared (
8177 lView ,
8278 index ,
@@ -88,7 +84,7 @@ export function ɵɵelementStart(
8884 localRefsIndex ,
8985 ) ;
9086
91- if ( ngDevMode && tView . firstCreatePass ) {
87+ if ( ngDevMode && lView [ TVIEW ] . firstCreatePass ) {
9288 validateElementIsKnown ( lView , tNode ) ;
9389 }
9490
0 commit comments