how to do the activat route in angular? : My url
http://xx.xx.xxx.xxx:xxxx/#/Test?name=7779394

how can i get '7779394'?

i tried the follow code:
        this.activatedRoute.queryParams.subscribe(params => {
      this.ind = params.name;

      console.log("this.ind " + params.name);

    });

but the result is undefined first, after undefined, the function run again 
and god 7779394

but it should run one time only 

how to fix this ?