title: Property 'snapshot' doesnot exist on type 'typeof ActivatedRoute'
body: <p>I am using ActivatedRoute for passing id to another route. But when i use snapshot like:</p>
  
  <pre><code>let studentCode = this._activatedroute.snapshot.params['id']
  </code></pre>
  
  <p>it gives an error: <code>Property 'snapshot' does not exist on type 'typeof ActivatedRoute'.</code>
  here <code>id</code> is the id to be passed that I used in ngFor iteration.</p>
  
  <p>Full component code where activated route is used:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import{ StudentHttpServService } from '../show-students/student-http-serv.service';
  import {Router, ActivatedRoute} from '@angular/router';
  import {Inject} from '@angular/core';
  
  @Component({
    selector: 'app-classes-component',
    templateUrl: './classes-component.component.html',
    styleUrls: ['./classes-component.component.css']
  })
  export class studentDetailsComponent implements OnInit {
  
    constructor(@Inject(StudentHttpServService) private __astudentHttpServService: StudentHttpServService, @Inject(ActivatedRoute) private _activatedroute = ActivatedRoute, @Inject(Router) private _router:Router) { 
  
     }
  
  
    ngOnInit() {
  
  //this._StudentHttpServService.getstudentDetailsHttpSrv()
  let studentCode = this._activatedroute.snapshot.params['id']
  
    }
  
  }
  </code></pre>
  
  <p>Pls let me know if i need to give code for router in app.module.ts or the iteration code (html and ts files). Thanks in advance.</p>