@@ -15,6 +15,7 @@ import {
1515 Input ,
1616 IterableDiffer ,
1717 IterableDiffers ,
18+ NO_ERRORS_SCHEMA ,
1819 NgZone ,
1920 OnDestroy ,
2021 Output ,
@@ -31,7 +32,13 @@ registerElement('CollectionView', () => CollectionView);
3132const NG_VIEW = '_ngViewRef' ;
3233
3334export class ItemContext {
34- constructor ( public $implicit ?: any , public item ?: any , public index ?: number , public even ?: boolean , public odd ?: boolean ) { }
35+ constructor (
36+ public $implicit ?: any ,
37+ public item ?: any ,
38+ public index ?: number ,
39+ public even ?: boolean ,
40+ public odd ?: boolean
41+ ) { }
3542}
3643
3744export interface SetupItemViewArgs {
@@ -48,7 +55,8 @@ export interface SetupItemViewArgs {
4855 <Placeholder #loader></Placeholder>
4956 </DetachedContainer>
5057 ` ,
51- changeDetection : ChangeDetectionStrategy . OnPush
58+ changeDetection : ChangeDetectionStrategy . OnPush ,
59+ schemas : [ NO_ERRORS_SCHEMA ]
5260} )
5361export class CollectionViewComponent implements DoCheck , OnDestroy , AfterContentInit {
5462 public get nativeElement ( ) : any {
@@ -197,7 +205,7 @@ export class CollectionViewComponent implements DoCheck, OnDestroy, AfterContent
197205 }
198206 if ( ! this . items ) return ;
199207 const index = args . index ;
200- const items = ( args . object as any ) . items ;
208+ const items = args . object . items ;
201209 const currentItem = typeof items . getItem === 'function' ? items . getItem ( index ) : items [ index ] ;
202210 let viewRef : EmbeddedViewRef < ItemContext > ;
203211
@@ -408,7 +416,10 @@ export function getItemViewRoot(viewRef: ComponentView, rootLocator: RootLocator
408416
409417@Directive ( { selector : '[cvTemplateKey]' } )
410418export class TemplateKeyDirective {
411- constructor ( private templateRef : TemplateRef < any > , @Host ( ) private collectionView : CollectionViewComponent ) { }
419+ constructor (
420+ private templateRef : TemplateRef < any > ,
421+ @Host ( ) private collectionView : CollectionViewComponent
422+ ) { }
412423
413424 @Input ( )
414425 set cvTemplateKey ( value : any ) {
0 commit comments