Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: standalone components
  • Loading branch information
herefishyfish committed Oct 3, 2023
commit 46547a595fdee0368a04ce8a72b800c3bb3a23ec
5 changes: 3 additions & 2 deletions packages/angular/src/lib/cdk/list-view/list-view.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Directive, DoCheck, ElementRef, EmbeddedViewRef, EventEmitter, forwardRef, Host, HostListener, inject, Inject, InjectionToken, Input, IterableDiffer, IterableDiffers, NgZone, NO_ERRORS_SCHEMA, OnDestroy, Output, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
import { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, Directive, DoCheck, ElementRef, EmbeddedViewRef, EventEmitter, forwardRef, Host, HostListener, inject, Inject, InjectionToken, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, Output, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
import { ItemEventData, KeyedTemplate, LayoutBase, ListView, ObservableArray, profile, View } from '@nativescript/core';

import { extractSingleViewRecursive } from '../../element-registry/registry';
import { NativeScriptDebug } from '../../trace';
import { isListLikeIterable } from '../../utils/general';
import { NgViewTemplate } from '../../view-refs';
import { DetachedLoader } from '../detached-loader';

const NG_VIEW = '_ngViewRef';

Expand Down Expand Up @@ -91,8 +92,8 @@ export interface SetupItemViewArgs<T> {
</DetachedContainer>`,
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [DetachedLoader],
providers: [{ provide: TEMPLATED_ITEMS_COMPONENT, useExisting: forwardRef(() => ListViewComponent) }],
schemas: [NO_ERRORS_SCHEMA],
})
export class ListViewComponent<T = any> implements DoCheck, OnDestroy, AfterContentInit, TemplatedItemsHost {
public get nativeElement(): ListView {
Expand Down