这是问题,
我实际上是在尝试那里的例子:
https://github.com/angular/material2
我被困在这一个:
https://github.com/angular/material2/tree/master/src/demo-app/autocomplete
我在CLI中使用angular2,所以我有一个新模板,我尝试“复制/粘贴”这个组件。但它失败了这条消息:
Unhandled Promise rejection: Template parse errors:
Can't bind to 'mdAutocomplete' since it isn't a known propery of 'input'. ("
<div class="demo-autocomplete">
<md-input-container>
<input mdInput placeholder="state" [ERROR ->][mdAutocomplete]="auto">
...
...
There is no directive with "exportAs" set to "mdAutocomplete"
...
看起来mdAutocomplete指令不存在。 我一步一步地按照例子,有什么不对吗?
感谢您阅读/帮助
答案 0 :(得分:2)
MdAutoComplete
尚未完成! https://github.com/angular/material2/tree/master/src/lib/autocomplete
material2的更改日志说: https://github.com/angular/material2/blob/master/CHANGELOG.md
2.0.0-beta.1 rebar-teacup(2016-12-23)
MdAutocompleteModule