How to use the material-components-web.checkbox function in material-components-web

To help you get started, we’ve selected a few material-components-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngageoint / mage-server / public / app / observation / form / checkbox.edit.js View on Github external
const MDCCheckbox = require('material-components-web').checkbox.MDCCheckbox
  , MDCFormField = require('material-components-web').formField.MDCFormField;

module.exports = {
  template: require('./checkbox.edit.html'),
  bindings: {
    field: '<'
  },
  controller: ['$element', function($element) {
    this.$postLink = function() {
      // $timeout(function() {
        var checkbox = new MDCCheckbox($element.find('.mdc-checkbox')[0])
        var formField = new MDCFormField($element.find('.mdc-form-field')[0])
        formField.input = checkbox;
      // }.bind(this))
    }
  }]
github ngageoint / mage-server / public / app / export / export.js View on Github external
var $ = require('jquery')
  , MDCDialog = require('material-components-web').dialog.MDCDialog
  , MDCSelect = require('material-components-web').select.MDCSelect
  , MDCCheckbox = require('material-components-web').checkbox.MDCCheckbox
  , MDCFormField = require('material-components-web').formField.MDCFormField
  , moment = require('moment');

  module.exports = {
    template: require('./export.html'),
    bindings: {
      open: '<',
      events: '<',
      onExportClose: '&'
    },
    controller: ExportController
  };

ExportController.$inject = ['LocalStorageService', 'FilterService', '$timeout', '$element'];

function ExportController(LocalStorageService, FilterService, $timeout, $element) {