Angular6 ngrx和导出成员错误[没有导出成员]
我正在使用ngrx,但我得到如下错误[6]Angular6 ngrx和导出成员错误[没有导出成员],angular6,ngrx,Angular6,Ngrx,我正在使用ngrx,但我得到如下错误[6] ERROR in src/app/app.component.ts(3,10): error TS2305: Module '"C:/Angular Activity/NgRxExample/currency-conversion/src/app/actions/amount"' has no exported member 'AmountChangeAction'. src/app/app.module.ts(6,9): error TS2305:
ERROR in src/app/app.component.ts(3,10): error TS2305: Module '"C:/Angular Activity/NgRxExample/currency-conversion/src/app/actions/amount"'
has no exported member 'AmountChangeAction'.
src/app/app.module.ts(6,9): error TS2305: Module '"C:/Angular Activity/NgRxExample/currency-conversion/src/app/actions/amount"' has no exported member 'AmountChangeAction'.
src/app/reducers/amount.ts(4,58): error TS2694: Namespace '"C:/Angular Activity/NgRxExample/currency-conversion/src/app/actions/amount"' has
no exported member 'AmountChangeAction'.
src/app/reducers/amount.ts(7,21): error TS2339: Property 'AMOUNTCHANGE' does not exist on type 'typeof import("C:/Angular Activity/NgRxExample/currency-conversion/src/app/actions/amount")'
货币兑换税
import {Currency} from './../models/currency';
import { Action } from '@ngrx/store';
export const CURRENCIESUPDATE = '[Currency] UpdateAll';
export const CURRENCIESUPDATED = '[Currency] UpdatedAll';
export class CurrenciesUpdateAction implements Action {
readonly type = CURRENCIESUPDATE
}
export class CurrenciesUpdatedAction implements Action {
readonly type = CURRENCIESUPDATED
constructor(public payload: Currency[]) {}
}
金额:1.ts:
import {Currency} from './../models/currency';
import { Action } from '@ngrx/store';
export const CURRENCIESUPDATE = '[Currency] UpdateAll';
export const CURRENCIESUPDATED = '[Currency] UpdatedAll';
export class CurrenciesUpdateAction implements Action {
readonly type = CURRENCIESUPDATE
}
export class CurrenciesUpdatedAction implements Action {
readonly type = CURRENCIESUPDATED
constructor(public payload: Currency[]) {}
}
请让我知道这是什么遗漏,我是第一次使用ngrx,所以请原谅,如果这是非常愚蠢的
我用的是角度6
My package.json:
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^7.4.0",
"@ngrx/store": "^7.4.0",
"core-js": "^2.5.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
从共享的代码片段来看,看起来确实没有
AmountChangeAction
操作