【发布时间】:2017-12-14 13:53:45
【问题描述】:
我很难运行这个例子 https://github.com/abritopach/ionic2-d3js-example
我安装了最新的 ionic 2 版本、npm 等,但如果我尝试运行该应用程序,我会在浏览器控制台中收到错误消息。
polyfills.js:3 Unhandled Promise rejection: Template parse errors:
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to > the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<super-tabs height="100%">
<super-tab [ERROR ->][tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar C"): ng:///AppModule/TabsPage.html@1:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("s height="100%">
<super-tab [tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [tabRoot]="tab3Root" title="Pie Ch"): ng:///AppModule/TabsPage.html@2:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("art"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab3Root" title="Pie Chart"></super-tab>
</super-tabs>
"): ng:///AppModule/TabsPage.html@3:15 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<super-tabs height="100%">
<super-tab [ERROR ->][tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar C"): ng:///AppModule/TabsPage.html@1:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("s height="100%">
<super-tab [tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [tabRoot]="tab3Root" title="Pie Ch"): ng:///AppModule/TabsPage.html@2:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("art"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab3Root" title="Pie Chart"></super-tab>
</super-tabs>
"): ng:///AppModule/TabsPage.html@3:15
at syntaxError (http://localhost:8100/build/vendor.js:34999:34)
at TemplateParser.parse (http://localhost:8100/build/vendor.js:45490:19)
at JitCompiler._compileTemplate (http://localhost:8100/build/vendor.js:59241:39)
at http://localhost:8100/build/vendor.js:59165:62
at Set.forEach (native)
at JitCompiler._compileComponents (http://localhost:8100/build/vendor.js:59165:19)
at createResult (http://localhost:8100/build/vendor.js:59050:19)
at t.invoke (http://localhost:8100/build/polyfills.js:3:8971)
at r.run (http://localhost:8100/build/polyfills.js:3:4140)
at http://localhost:8100/build/polyfills.js:3:13731 Error: Template parse errors:
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<super-tabs height="100%">
<super-tab [ERROR ->][tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar C"): ng:///AppModule/TabsPage.html@1:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("s height="100%">
<super-tab [tabRoot]="tab1Root" title="Line Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [tabRoot]="tab3Root" title="Pie Ch"): ng:///AppModule/TabsPage.html@2:15
Can't bind to 'tabRoot' since it isn't a known property of 'super-tab'.
1. If 'super-tab' is an Angular component and it has 'tabRoot' input, then verify that it is part of this module.
2. If 'super-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("art"></super-tab>
<super-tab [tabRoot]="tab2Root" title="Bar Chart"></super-tab>
<super-tab [ERROR ->][tabRoot]="tab3Root" title="Pie Chart"></super-tab>
</super-tabs>
"): ng:///AppModule/TabsPage.html@3:15
at syntaxError (http://localhost:8100/build/vendor.js:34999:34)
at TemplateParser.parse (http://localhost:8100/build/vendor.js:45490:19)
at JitCompiler._compileTemplate (http://localhost:8100/build/vendor.js:59241:39)
at http://localhost:8100/build/vendor.js:59165:62
at Set.forEach (native)
at JitCompiler._compileComponents (http://localhost:8100/build/vendor.js:59165:19)
at createResult (http://localhost:8100/build/vendor.js:59050:19)
at t.invoke (http://localhost:8100/build/polyfills.js:3:8971)
at r.run (http://localhost:8100/build/polyfills.js:3:4140)
at http://localhost:8100/build/polyfills.js:3:13731
我的配置:
- @ionic/cli-utils : 1.4.0
- 离子 CLI:3.4.0
- @ionic/app-scripts : 2.0.0
- @ionic/cli-plugin-ionic-angular : 1.3.1
- 离子框架:离子角 3.5.0
- 节点:v7.10.0
- 操作系统:OS X El Capitan
- Xcode:未安装
- ios-deploy:未安装
- ios-sim : 未安装
- npm : 5.1.0
谁能帮帮我?
【问题讨论】:
-
确切的错误是什么?
-
@moh89 这是我能看到的唯一错误
-
如果我没记错的话,调用 [tab root] 的对象有问题,该对象已被 [super -tab] 类的对象调用
-
import { Component } from '@angular/core'; import { BarChartPage } from '../bar-chart/bar-chart'; import { PieChartPage } from '../pie-chart/pie-chart'; import { LineChartPage } from '../line-chart/line-chart'; @Component({ templateUrl: 'tabs.html' }) export class TabsPage { tab1Root = LineChartPage; tab2Root = BarChartPage; tab3Root = PieChartPage; constructor() { } }我使用了示例中的 sn-p。我在 2.6.3 版本上降级了 ionic2-super-tabs,但它仍然无法正常工作。
标签: javascript angularjs node.js d3.js ionic-framework