1.

What Is Angular Material Chips?

Answer»

md-chips, an Angular Directive, is used as a special component called Chip and can be used to represent small set of information for example, a contact, tags etc. Custom TEMPLATE can be used render the content of a chip. This can be achieved by SPECIFYING an md-chip-template ELEMENT having the custom content as a child of md-chips.

Attributes

  1. * ng-model: Assignable angular expression to data-bind to.
  2. * ng-model: A model to bind the list of items to.
  3. * md-transform-chip: An expression of form myFunction($chip) that when called expects one of the following return values:
    ->an object representing the $chip input string.
    ->undefined to simply add the $chip input string, or.
    ->null to prevent the chip from being appended.
  4. * md-require-match: If true, and the chips template contains an autocomplete, only allow selection of pre-defined chips (i.e. you cannot add new ones).
  5. placeholder: Placeholder text that will be forwarded to the input.
  6. secondary-placeholder: Placeholder text that will be forwarded to the input, displayed when there is at LEAST on item in the list.
  7. readonly: Disables list manipulation (deleting or adding list items), hiding the input and delete buttons.
  8. md-on-add: An expression which will be called when a chip has been added.
  9. md-on-remove: An expression which will be called when a chip has been removed.
  10. md-on-select: An expression which will be called when a chip is selected.

md-chips, an Angular Directive, is used as a special component called Chip and can be used to represent small set of information for example, a contact, tags etc. Custom template can be used render the content of a chip. This can be achieved by specifying an md-chip-template element having the custom content as a child of md-chips.

Attributes



Discussion

No Comment Found