1
我一直在下面使用飛鏢作爲語言Angular2網站的英雄之旅,我有一個錯誤,當我嘗試使用大寫管:Angular2遊飛鏢:大寫
Build error:
Transform TemplateCompiler on angular2_tour_of_heroes|lib/heroes_component.ng_meta.json threw error: Template parse errors:
The pipe 'uppercase' could not be found ("
這裏是我heroes_component.html
文件:
<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="let hero of heroes"
[class.selected]="hero == selectedHero"
(click)="onSelect(hero)">
<span class="badge">{{hero.id}}</span> {{hero.name}}
</li>
</ul>
<div *ngIf="selectedHero != null">
<h2> {{selectedHero.name | uppercase}} is my hero </h2>
<button (click)="gotoDetail()">View Details</button>
</div>
這不是什麼大不了的事,但我想知道爲什麼發生這種情況。我在Linux上使用pub 1.18.1和Dart VM版本:1.18.1。
爲了完整起見,這裏是我的pubspec文件:
name: angular2_tour_of_heroes
description: Tour of heroes
version: 0.0.1
environment:
sdk: '>=1.13.0 <2.0.0'
dependencies:
angular2: 2.0.0-beta.18
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart
- dart_to_js_script_rewriter
我'pubspec'已經包含了'platform_pipes: - 「包:angular2/common.dart#COMMON_PIPES'' – glapworth
我不認爲有某種變化相關的管道,但可能是值得一試更新到公測.19 –
很高興聽到:)並完成。 –