更新angular2 Beta 11后发生错误

时间:2016-03-21 08:34:30

标签: angular

在将angular2 beta.8更新为beta11后,@ view无法正常工作。我在termial

中收到此错误
ERROR in ./~/ng2-bootstrap/components/datepicker/yearpicker.ts
(2,14): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

ERROR in ./~/ng2-bootstrap/components/datepicker/monthpicker.ts
(2,14): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

ERROR in ./src/app/components/subrouting/sub-routing.ts
(1,20): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

ERROR in ./src/app/components/sub-routing-2/sub-routing-2.ts
(1,20): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

ERROR in ./src/app/components/access-directives/access-directives.ts
(1,20): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

ERROR in ./src/app/components/access-data-bt-component/send-data.ts
(1,20): error TS2305: Module '"/home/dinesh/dev/angular2-seed-with-gulp/node_modules/angular2/core"' has no exported member 'View'.

1 个答案:

答案 0 :(得分:7)

移除了@View装饰器。 @View(...)设置的参数也可以由@Component(...)设置。

另见
- https://github.com/angular/angular/issues/7363
- https://github.com/angular/angular/issues/7658