我試圖讓Angular's UI電網運行和使用下面的代碼:角/ UI的網格(NG-格)/角沒有定義
import {NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {RouterModule} from "@angular/router";
import {BosOverviewComponent} from "./bosoverview.component";
import {UiGridModule} from 'angular-ui-grid';
@NgModule({
declarations: [
BosOverviewComponent
],
imports: [
BrowserModule,
RouterModule,
UiGridModule
],
exports: [
BosOverviewComponent
],
})
export class BusinessObjectsModule {
}
使用NPM開始,我總是得到出現以下錯誤:
Uncaught ReferenceError: angular is not defined
at ui-grid.js:8
at Object.../../../../angular-ui-grid/ui-grid.js (ui-grid.js:10)
at __webpack_require__ (inline.bundle.js:55)
at Object.../../../../angular-ui-grid/index.js (index.js:1)
at __webpack_require__ (inline.bundle.js:55)
at Object.../../../../../src/app/views/businessobjects/businessobjects.module.ts (bosoverview.component.ts:7)
at __webpack_require__ (inline.bundle.js:55)
at Object.../../../../../src/app/app.module.ts (app.helpers.ts:66)
at __webpack_require__ (inline.bundle.js:55)
at Object.../../../../../src/main.ts (environment.ts:8)
我該怎麼辦?謝謝!