Skip to content

Commit 04f1438

Browse files
author
farfromrefug
committed
chore: angular build fix
1 parent ceea516 commit 04f1438

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

src/collectionview/angular/collectionview-comp.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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);
3132
const NG_VIEW = '_ngViewRef';
3233

3334
export 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

3744
export 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
})
5361
export 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]' })
410418
export 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) {

src/collectionview/angular/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CollectionViewComponent, TemplateKeyDirective } from './collectionview-
55
export { CollectionViewComponent, TemplateKeyDirective } from './collectionview-comp';
66

77
@NgModule({
8-
declarations: [CollectionViewComponent, TemplateKeyDirective],
8+
imports: [CollectionViewComponent, TemplateKeyDirective],
99
exports: [CollectionViewComponent, TemplateKeyDirective],
1010
schemas: [NO_ERRORS_SCHEMA]
1111
})

src/swipemenu/angular/module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export class SwipeMenuComponent {
3030

3131
private _gestureEnabled: boolean;
3232

33-
constructor(@Inject(ElementRef) public elementRef: ElementRef, @Inject(ViewContainerRef) private viewContainer: ViewContainerRef) {
33+
constructor(
34+
@Inject(ElementRef) public elementRef: ElementRef,
35+
@Inject(ViewContainerRef) private viewContainer: ViewContainerRef
36+
) {
3437
this.swipemenu = this.elementRef.nativeElement;
3538
}
3639

@@ -163,7 +166,7 @@ registerElement('SwipeMenu', () => SwipeMenu, sideSwipeMenuMeta);
163166
* NgModule containing all of the RadSideSwipeMenu directives.
164167
*/
165168
@NgModule({
166-
declarations: [SwipeMenuComponent, SIDEDRAWER_DIRECTIVES],
169+
imports: [SwipeMenuComponent, SIDEDRAWER_DIRECTIVES],
167170
exports: [SwipeMenuComponent, SIDEDRAWER_DIRECTIVES]
168171
})
169172
export class SwipeMenuModule {}

0 commit comments

Comments
 (0)