angular 库中的 AOT 编译错误
AOT Compilation error in angular library
我为 Angular 2 创建了一个库,但我卡在了 this issue。
我收到这个错误:
ERROR in C:/xampp/htdocs/github/jw-bootstrap-switch-ng2/switch-project/src/$$_gendir/node_modules/jw-bootstrap-switch-ng2/src/directive.ngfactory.ts (246,59): Property 'subscribe' does not exist on type 'boolean'.
我不明白我的代码有什么问题。
您可以在 Github here
上查看我的代码
如果有人对此问题有更多经验,请告诉我。我会感谢你的帮助。
谢谢
您在此代码中遇到工厂错误
this.context.value.subscribe(_eventHandler.bind(view,'value')));
这意味着您有 output
属性 名称为 value
@Component({
selector: 'bSwitch',
outputs: ['value'],
但同时我看到:
get value(): boolean {
return this._innerState;
};
set value(v: boolean) {
if (v === null || typeof v === "undefined") this._indeterminate = true;
this.setStateValue(v);
}
所以我会删除
outputs: ['value'],
我为 Angular 2 创建了一个库,但我卡在了 this issue。
我收到这个错误:
ERROR in C:/xampp/htdocs/github/jw-bootstrap-switch-ng2/switch-project/src/$$_gendir/node_modules/jw-bootstrap-switch-ng2/src/directive.ngfactory.ts (246,59): Property 'subscribe' does not exist on type 'boolean'.
我不明白我的代码有什么问题。
您可以在 Github here
上查看我的代码如果有人对此问题有更多经验,请告诉我。我会感谢你的帮助。
谢谢
您在此代码中遇到工厂错误
this.context.value.subscribe(_eventHandler.bind(view,'value')));
这意味着您有 output
属性 名称为 value
@Component({
selector: 'bSwitch',
outputs: ['value'],
但同时我看到:
get value(): boolean {
return this._innerState;
};
set value(v: boolean) {
if (v === null || typeof v === "undefined") this._indeterminate = true;
this.setStateValue(v);
}
所以我会删除
outputs: ['value'],