File

src/modules/lesson/page-mine/page-spot-detail/page-spot-detail.component.ts

Metadata

selector app-page-spot-detail
styleUrls page-spot-detail.component.scss
templateUrl page-spot-detail.component.html

Constructor

constructor(route: ActivatedRoute)

Properties

spot
spot: any
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router'

@Component({
  selector: 'app-page-spot-detail',
  templateUrl: './page-spot-detail.component.html',
  styleUrls: ['./page-spot-detail.component.scss']
})
export class PageSpotDetailComponent {
  spot: any = {}

  // 依赖注入
  constructor(private route: ActivatedRoute) {

    this.route.queryParams.subscribe(params => {
      this.spot = params
      console.log(this.spot)
    })
  }

}

results matching ""

    No results matching ""