ng2-materialize
Version:
An Angular 2+ wrap around Materialize library
31 lines (30 loc) • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var MzParallaxComponent = (function () {
function MzParallaxComponent(renderer) {
this.renderer = renderer;
}
MzParallaxComponent.prototype.ngAfterViewInit = function () {
this.renderer.setElementStyle(this.parallaxContainer.nativeElement, 'height', isNaN(this.height) ? '500px' : this.height + 'px');
this.renderer.invokeElementMethod($(this.parallax.nativeElement), 'parallax');
};
return MzParallaxComponent;
}());
MzParallaxComponent.decorators = [
{ type: core_1.Component, args: [{
selector: 'mz-parallax',
template: "<div #parallaxContainer class=\"parallax-container\"><div #parallax class=\"parallax\"><ng-content></ng-content></div></div>",
styles: [""],
},] },
];
/** @nocollapse */
MzParallaxComponent.ctorParameters = function () { return [
{ type: core_1.Renderer, },
]; };
MzParallaxComponent.propDecorators = {
'height': [{ type: core_1.Input },],
'parallax': [{ type: core_1.ViewChild, args: ['parallax',] },],
'parallaxContainer': [{ type: core_1.ViewChild, args: ['parallaxContainer',] },],
};
exports.MzParallaxComponent = MzParallaxComponent;