Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit, OnDestroy } from "@angular/core";
- import { AboutService } from "./about.service";
- import { Subscription } from "rxjs";
- @Component({
- selector: "app-about",
- templateUrl: "./about.page.html",
- styleUrls: ["./about.page.scss"]
- })
- export class AboutPage implements OnInit, OnDestroy {
- about: string;
- private aboutSubs: Subscription;
- constructor(private aboutService: AboutService) {}
- ngOnInit() {
- this.aboutSubs = this.aboutService.showAbout().subscribe(data => {
- this.about = data.section[0].text.div;
- });
- }
- ngOnDestroy() {
- if (this.aboutSubs) {
- this.aboutSubs.unsubscribe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement