Kendo UI 和 Angular 2 期
Kendo UI with Angular 2 issue
正在尝试关注 http://www.telerik.com/kendo-angular-ui/getting-started/
从浏览器控制台收到此错误...服务器端没有错误...
<button kendoButton (click)="onButtonClick()" [ERROR ->][primary]=true >My Kendo UI Button</button>
"): AppComponent@9:46 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
Can't bind to 'primary' since it isn't a known property of 'button'. ("
<app-date>test</app-date>
<button kendoButton (click)="onButtonClick()" [ERROR ->][primary]=true >My Kendo UI Button</button>
"): AppComponent@9:46
at TemplateParser.parse (http://localhost:4200/main.bundle.js:15261:19)
at RuntimeCompiler._compileTemplate (http://localhost:4200/main.bundle.js:33578:51)
at http://localhost:4200/main.bundle.js:33501:83
at Set.forEach (native)
at compile (http://localhost:4200/main.bundle.js:33501:47)
at ZoneDelegate.invoke (http://localhost:4200/main.bundle.js:64762:28)
at Zone.run (http://localhost:4200/main.bundle.js:64655:43)
at http://localhost:4200/main.bundle.js:65021:57
at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:64795:37)
at Zone.runTask (http://localhost:4200/main.bundle.js:64695:47)consoleError @ zone.js:344_loop_1 @ zone.js:371drainMicroTaskQueue @ zone.js:375
zone.js:346Error: Uncaught (in promise): Error: Template parse errors:(…)consoleError @ zone.js:346_loop_1 @ zone.js:371drainMicroTaskQueue @ zone.js:375
从 button
标签中删除 [primary]=true
后检查。
像这样更新您的 AppModule-
第 1 步:像这样导入 ButtonsModule-
import { ButtonsModule } from '@progress/kendo-angular-buttons';
第二步:像这样更新@NgModule-
@NgModule({
imports: [ BrowserModule, ButtonsModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
这将修复您的模板解析错误。
Angular2 版本RC6
Kendo版本0.9.3
正在尝试关注 http://www.telerik.com/kendo-angular-ui/getting-started/
从浏览器控制台收到此错误...服务器端没有错误...
<button kendoButton (click)="onButtonClick()" [ERROR ->][primary]=true >My Kendo UI Button</button>
"): AppComponent@9:46 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
Can't bind to 'primary' since it isn't a known property of 'button'. ("
<app-date>test</app-date>
<button kendoButton (click)="onButtonClick()" [ERROR ->][primary]=true >My Kendo UI Button</button>
"): AppComponent@9:46
at TemplateParser.parse (http://localhost:4200/main.bundle.js:15261:19)
at RuntimeCompiler._compileTemplate (http://localhost:4200/main.bundle.js:33578:51)
at http://localhost:4200/main.bundle.js:33501:83
at Set.forEach (native)
at compile (http://localhost:4200/main.bundle.js:33501:47)
at ZoneDelegate.invoke (http://localhost:4200/main.bundle.js:64762:28)
at Zone.run (http://localhost:4200/main.bundle.js:64655:43)
at http://localhost:4200/main.bundle.js:65021:57
at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:64795:37)
at Zone.runTask (http://localhost:4200/main.bundle.js:64695:47)consoleError @ zone.js:344_loop_1 @ zone.js:371drainMicroTaskQueue @ zone.js:375
zone.js:346Error: Uncaught (in promise): Error: Template parse errors:(…)consoleError @ zone.js:346_loop_1 @ zone.js:371drainMicroTaskQueue @ zone.js:375
从 button
标签中删除 [primary]=true
后检查。
像这样更新您的 AppModule-
第 1 步:像这样导入 ButtonsModule-
import { ButtonsModule } from '@progress/kendo-angular-buttons';
第二步:像这样更新@NgModule-
@NgModule({
imports: [ BrowserModule, ButtonsModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
这将修复您的模板解析错误。
Angular2 版本RC6
Kendo版本0.9.3