import {module} from '../module'; /** * A simple component to show non-obstructive notifications to the user. */ export default class Controller { constructor($element) { this.snackbar = $element[0].firstChild; componentHandler.upgradeElement(this.snackbar); } /** * Shows a notification. * * @param {Object} data The message data */ show(data) { this.snackbar.MaterialSnackbar.showSnackbar(data); } } Controller.$inject = ['$element']; module.component('vnSnackbar', { template: require('./snackbar.html'), controller: Controller });