How to get routing parameters by angular6.x, online, etc.

as the title: novice to angular, I really don"t understand the official method of obtaining routing parameters. The code is as follows

//  /-sharp/store/assets-list/case  
/*
    :
    store
    assets-list
    caseid
    :assets-listngOnInit
*/

questions are as follows

// assets-list
import { Router, ActivatedRoute, ParamMap } from "@angular/router";
constructor(
    private router: Router,
    private routerParams: ActivatedRoute
  ) { }
ngOnInit() {
    this.routerParams.snapshot.paramMap.get("id")  // id
}
/*
* caseid,
* 
* vue watch router
*/

some people seem to use Observable objects after reading the official documents, but copy the official demo code and get no results at all (no errors reported)
online, etc.

Mar.28,2021

for this seed component, it is only rendered once, but in many cases where the connection will be routed to this sub-component, the ID cannot be fetched with a snapshot. The ID obtained by the snapshot is only the ID, rendered for the first time. The paramMap property of the ActivatedRoute service should be used. ParamMap is an Observable object. Each time the route changes, it will emit a (params: ParamMap) object, and then use params.get ('id') to get the ID

.
Go to sidekicks</button>
Menu