feat(core): add backend bundles section for landing

This commit is contained in:
Valentin Kononov 2019-02-05 18:53:21 +03:00
commit 92acc44a32
24 changed files with 936 additions and 42 deletions

View file

@ -4,28 +4,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { Component, OnDestroy } from '@angular/core';
import { Descriptions, DescriptionsService } from '../../../@core/data/service/descriptions.service';
import { takeWhile } from 'rxjs/operators';
import { Component, Input } from '@angular/core';
import { Descriptions } from '../../../@core/data/service/descriptions.service';
@Component({
selector: 'ngx-landing-description-section',
templateUrl: './description-section.component.html',
styleUrls: ['./description-section.component.scss'],
})
export class DescriptionSectionComponent implements OnDestroy {
private alive = true;
descriptions: Descriptions[];
constructor(private descriptionsService: DescriptionsService) {
this.descriptionsService.getDescriptions()
.pipe(takeWhile(() => this.alive))
.subscribe((descriptions) => this.descriptions = descriptions);
}
ngOnDestroy() {
this.alive = false;
}
export class DescriptionSectionComponent {
@Input() descriptions: Descriptions[];
}