File
Metadata
selector |
app-page-spot-detail |
styleUrls |
page-spot-detail.component.scss |
templateUrl |
page-spot-detail.component.html |
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)
})
}
}