I'm making a few assumptions here:
- You used the Angular CLI to create your A2 project
- You used NPM to bring in the Wijmo library into your project
If so, then within the module where you are using Wijmo, you need to ensure you import the necessary Wijmo modules, ie:
...
import { WjCoreModule } from 'wijmo/wijmo.angular2.core';
import { WjGridModule } from 'wijmo/wijmo.angular2.grid';
import { WjInputModule } from 'wijmo/wijmo.angular2.input';
...
@NgModule({
declarations: [AppComponent],
imports: [
...
WjCoreModule,
WjGridModule,
WjInputModule,
...
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Then within the component you are working on, ensure you import the Collection view, ie:
...
import { CollectionView } from 'wijmo/wijmo';
@Component({
selector: 'app-test',
templateUrl: './test.component.html'
})
export class TestComponent {
data : CollectionView();
...
As a final note - you shouldn't need to wrap your data in an Wijmo ObservableArray prior to passing it into the CollectionView - just pass the data array into the CollectionView directly.