angular 通过路由获取ID

    constructor(
        private dataService: TestListsService,
        private route: ActivatedRoute,
      ) {
      // 通过路由获取ID
      console.log(route);
      this.id = this.route.params.value['id'];
    }
import { ActivatedRoute } from '@angular/router';

 

posted @ 2018-01-23 17:42  boyanh  阅读(1662)  评论(0编辑  收藏  举报