Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Den här utvecklingskatalogen är arkiverad. Du kan se filer och klona katalogen, men inte öppna ärenden eller genomföra push- eller pull-förfrågningar.
|
- import { Component, OnInit } from '@angular/core';
- import { ActivatedRoute } from '@angular/router';
- import { Subscription } from 'rxjs';
- import { Location } from '@angular/common';
-
- @Component({
- selector: 'app-details',
- templateUrl: './details.component.html',
- styleUrls: ['./details.component.scss']
- })
- export class DetailsComponent implements OnInit {
- selectedSegment: string = 'forum';
- heading: string;
- routeSubscription: Subscription;
- selectedChapter: number = 1;
- showMorePostOptions: boolean = false;
- selectedPost: number;
-
- constructor(
- private route: ActivatedRoute,
- private location: Location
- ) { }
-
- ngOnInit(): void {
- this.routeSubscription = this.route.params.subscribe((params) => {
- this.heading = params['heading'];
- });
- }
-
- ngOnDestroy() {
- this.routeSubscription.unsubscribe();
- }
-
- back() {
- this.location.back();
- }
-
- }
|