Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular2 - Material2 examples : MdAutoComplete

Here is the problem,

I am actually trying the examples available there :

https://github.com/angular/material2

And I am stuck on this one :

https://github.com/angular/material2/tree/master/src/demo-app/autocomplete

I use angular2 with CLI, so I have a fresh template and I try to "copy/paste" this component. But it fails with this message :

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"
...

Looks like the mdAutocomplete directive does not exist. I follow the example step by step, is there something wrong ?

Thanks for reading/help

like image 243
Julo0sS Avatar asked Jul 31 '26 04:07

Julo0sS


1 Answers

MdAutoComplete isn't finished yet! https://github.com/angular/material2/tree/master/src/lib/autocomplete

material2's changelog says: https://github.com/angular/material2/blob/master/CHANGELOG.md

2.0.0-beta.1 rebar-teacup (2016-12-23)

  • Remove MdAutocompleteModule that was accidentally included in beta.0
  • Correct path to umd bundle in package.json (#2368) (d286e6d), closes #2366
like image 119
slaesh Avatar answered Aug 02 '26 16:08

slaesh