UNPKG

1.44 kBJavaScriptView Raw
1import { Component, HostBinding, Input } from '@angular/core';
2import { CarouselComponent } from './carousel.component';
3export var SlideComponent = (function () {
4 function SlideComponent(carousel) {
5 /** Wraps element by appropriate CSS classes */
6 this.addClass = true;
7 this.carousel = carousel;
8 }
9 /** Fires changes in container collection after adding a new slide instance */
10 SlideComponent.prototype.ngOnInit = function () {
11 this.carousel.addSlide(this);
12 };
13 /** Fires changes in container collection after removing of this slide instance */
14 SlideComponent.prototype.ngOnDestroy = function () {
15 this.carousel.removeSlide(this);
16 };
17 SlideComponent.decorators = [
18 { type: Component, args: [{
19 selector: 'slide',
20 template: "\n <div [class.active]=\"active\" class=\"item\">\n <ng-content></ng-content>\n </div>\n "
21 },] },
22 ];
23 /** @nocollapse */
24 SlideComponent.ctorParameters = function () { return [
25 { type: CarouselComponent, },
26 ]; };
27 SlideComponent.propDecorators = {
28 'active': [{ type: HostBinding, args: ['class.active',] }, { type: Input },],
29 'addClass': [{ type: HostBinding, args: ['class.item',] }, { type: HostBinding, args: ['class.carousel-item',] },],
30 };
31 return SlideComponent;
32}());
33//# sourceMappingURL=slide.component.js.map
\No newline at end of file