Posted 14 September 2017, 11:56 am EST
I know there have been a lot of questions about this, I’ve spent days - probably getting close to 10 total working days now - since I bought the enterprise license trying desperately to simply begin using it! I’ve read the blog posts to address this issue, I’ve attempted to replicate the provided examples too, but I always seem to run into an issue or many that will prevent the app from loading. This is a very frustrating process, so I’ll just get right to my current issue and hope someone can help…
When trying to start my app I see many warnings such as:
WARNING in ./~/wijmo/wijmo.angular2.grid.ts 755:27-44 "export 'detail' (imported as 'wjcGrid') was not found in 'wijmo/wijmo.grid'
Unhandled Promise rejection: Cannot set property culture of #<Object> which has only a getter ; Zone: angular ; Task: Promise.then ; Value: TypeError: Cannot set property culture of #<Object> which has only a getter at Object.<anonymous> (wijmo.ts:107) at __webpack_require__ (bootstrap 79541ca…:52) at Object.<anonymous> (wijmo.angular2.core.ts:3) ....
EXCEPTION: Uncaught (in promise): TypeError: Cannot set property culture of #<Object> which has only a getter TypeError: Cannot set property culture of #<Object> which has only a getter
These prevent the app from loading.
Here’s what I’m doing:
----Module----
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { routing } from './new.routing'; import { NewComponent } from './new.component'; import { WjCoreModule } from 'wijmo/wijmo.angular2.core'; import { WjChartModule } from 'wijmo/wijmo.angular2.chart'; import { WjGaugeModule } from 'wijmo/wijmo.angular2.gauge'; import { WjGridModule } from 'wijmo/wijmo.angular2.grid'; import { WjInputModule } from 'wijmo/wijmo.angular2.input'; import { WjOlapModule } from 'wijmo/wijmo.angular2.olap'; import { WjViewerModule } from 'wijmo/wijmo.angular2.viewer'; @NgModule({ imports: [ CommonModule, routing, CoreModule, WjCoreModule, WjGridModule, WjChartModule, WjGaugeModule, WjInputModule, WjOlapModule, WjViewerModule ] {) export class NewModule {}
----Component----
import { Component, OnInit } from '@angular/core'; import * as wjcCore from 'wijmo/wijmo'; import * as wjcGrid from 'wijmo/wijmo.grid'; // I've seen examples which instead import "from 'wijmo/wijmo.angular2.<thing>', so I've tried that as well, with no improvement @Component({ selector: 'new', templateUrl: './new.component.html', styleUrls: ['./new.component.scss'] }) export class AuditComponent implements OnInit { private auditRecords: Object = JSON.parse( { "items": [ { "time": 1488272665, "message": "audit message 1", "username": "webdevapi", }, { "time": 1488272587, "message": "audit message 2", "username": "webdevapi", }, { "time": 1488272586, "message": "audit message 3", "username": "webdevapi", }, { "time": 1488272586, "message": "Login Success:", "username": "webdevapi", }, { "time": 1488272581, "message": "audit message A", "username": "webdevapi", }, { "time": 1488272580, "message": "Login Success:", "username": "webdevapi", }, { "time": 1488270930, "message": "Login Success:", "username": "csm_processes", } ], "paging": { "offset": 0, "limit": 7, "count": 7, "pages": 1 } } );) constructor() {} ngOnInit() {} }
----HTML----
<wj-flex-grid [itemsSource]="auditRecords.items"> <wj-flex-grid-column [header]="'Time'" [binding]="'time'"> </wj-flex-grid-column> <wj-flex-grid-column [header]="'Message Content'" [binding]="'message'"> </wj-flex-grid-column> <wj-flex-grid-column [header]="'Username'" [binding]="'username'"> </wj-flex-grid-column> </wj-flex-grid>
I have searched exhaustively for a solution to this problem, I have not found one. Hopefully someone here can point me in the right direction.
