all files / app/main/components/material-docs/demo-partials/chips/demoCustomSeparatorKeys/ script.js

37.5% Statements 3/8
100% Branches 0/0
50% Functions 1/2
37.5% Lines 3/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                              
(function () {
  'use strict';
  angular
      .module('chipsCustomSeparatorDemo', ['ngMaterial'])
      .controller('CustomSeparatorCtrl', DemoCtrl);
 
  function DemoCtrl ($mdConstant) {
    // Use common key codes found in $mdConstant.KEY_CODE...
    this.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA];
    this.tags = [];
 
    // Any key code can be used to create a custom separator
    var semicolon = 186;
    this.customKeys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, semicolon];
    this.contacts = ['test@example.com'];
  }
})();