UNPKG

1.1 kBJavaScriptView Raw
1export { MaterializeDirective } from './materialize-directive';
2export { MaterializeModule } from './materialize-module';
3if (!("Materialize" in window)) {
4 throw new Error("Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize.");
5}
6if (!("Waves" in window)) {
7 throw new Error("Couldn't find Waves object on window. It is supposed to be created by the materialize-css library. Please import materialize-css before importing angular2-materialize.");
8}
9Waves.displayEffect();
10/**
11 * @param {...?} args
12 * @return {?}
13 */
14export function toast() {
15 var args = [];
16 for (var _i = 0; _i < arguments.length; _i++) {
17 args[_i] = arguments[_i];
18 }
19 Materialize.toast.apply(Materialize, args);
20}
21// polyfill remove any elem in DOM - https://github.com/InfomediaLtd/angular2-materialize/issues/377 (IE)
22if (!Element.prototype.remove) {
23 Element.prototype.remove = function remove() {
24 if (this.parentNode) {
25 this.parentNode.removeChild(this);
26 }
27 };
28}