ng2-bootstrap
Version:
Native Angular Bootstrap Components
33 lines • 1.44 kB
JavaScript
import { Component, HostBinding, Input } from '@angular/core';
import { CarouselComponent } from './carousel.component';
export var SlideComponent = (function () {
function SlideComponent(carousel) {
/** Wraps element by appropriate CSS classes */
this.addClass = true;
this.carousel = carousel;
}
/** Fires changes in container collection after adding a new slide instance */
SlideComponent.prototype.ngOnInit = function () {
this.carousel.addSlide(this);
};
/** Fires changes in container collection after removing of this slide instance */
SlideComponent.prototype.ngOnDestroy = function () {
this.carousel.removeSlide(this);
};
SlideComponent.decorators = [
{ type: Component, args: [{
selector: 'slide',
template: "\n <div [class.active]=\"active\" class=\"item\">\n <ng-content></ng-content>\n </div>\n "
},] },
];
/** @nocollapse */
SlideComponent.ctorParameters = function () { return [
{ type: CarouselComponent, },
]; };
SlideComponent.propDecorators = {
'active': [{ type: HostBinding, args: ['class.active',] }, { type: Input },],
'addClass': [{ type: HostBinding, args: ['class.item',] }, { type: HostBinding, args: ['class.carousel-item',] },],
};
return SlideComponent;
}());
//# sourceMappingURL=slide.component.js.map