Angular 角度库中的AOT编译错误
我为Angular 2制作了一个库,但我被卡住了 我得到这个错误:Angular 角度库中的AOT编译错误,angular,angular-cli,angular-compiler-cli,Angular,Angular Cli,Angular Compiler Cli,我为Angular 2制作了一个库,但我被卡住了 我得到这个错误: 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'. 我
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上查看我的代码
如果有人在这个问题上有更多的经验,请让我知道。我将感谢你的帮助
谢谢您在出厂时发现此代码中有错误
this.context.value.subscribe(_eventHandler.bind(view,'value')));
这意味着您拥有名为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'],
谢谢@yurzui,但是你在哪里找到这个.context.value.subscribe\u eventHandler.bindview,'value';
outputs: ['value'],