components icon indicating copy to clipboard operation
components copied to clipboard

md-chips example doesn't work

Open machtyn opened this issue 9 years ago • 1 comments

Bug, feature request, or proposal:

Fix md-chips example as given below

What is the expected behavior?

A new chip should be created when some text is entered on the input line and the Enter button pressed.

What is the current behavior?

When run in plunkr, a new chip was not created and errors were generated

What are the steps to reproduce?

Run the chips demo in plunkr Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

Is there anything else we should know?

Suggestions to fix: In chips-demo.html:47 <input mdInput (keyup.enter)="add($event)" placeholder="New Contributor...">

In chips-demo.ts:42 (add method)

add(input: KeyboardEvent): void {
    input.target.value.split(',').forEach( v => {
        this.people.push({name: v.trim()});
    });
    input.target.value = '';
}

machtyn avatar Feb 16 '17 22:02 machtyn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.