title: How to construct the URL of password reset password page in angular
body: <p>I have made a page for users to reset their password if they forget it. Users will get an email that will contain the link of reset password page along with reset token.</p>
  
  <p>URL of password page should look like this:</p>
  
  <p><a href="http://localhost:4200/#/resetpassword?code=CfDJ8LBxIxG2Gf5IjZZG9p+g7oDJxTqYPL7OnGSOIblOksnbNniISOo/jKuZ8RkPriLpsCle5VNwVII5O+r9KPmos1WcwmKCB5mMbYeO/tVKxUiqymsEDFjvWEt0X+KfIQlPbe8fvTMtAaB07IG01vwT2UWn+CjEAYwcZgV6eKhPEP21U9lxLxeG8bE6SXMwninNvWI1lf6jm3Ia1MIDikqL9EC033AMIGlnjvEonbxV+Jb" rel="nofollow noreferrer">http://localhost:4200/#/resetpassword?code=CfDJ8LBxIxG2Gf5IjZZG9p+g7oDJxTqYPL7OnGSOIblOksnbNniISOo/jKuZ8RkPriLpsCle5VNwVII5O+r9KPmos1WcwmKCB5mMbYeO/tVKxUiqymsEDFjvWEt0X+KfIQlPbe8fvTMtAaB07IG01vwT2UWn+CjEAYwcZgV6eKhPEP21U9lxLxeG8bE6SXMwninNvWI1lf6jm3Ia1MIDikqL9EC033AMIGlnjvEonbxV+Jb</a></p>
  
  <p>Here are is my route in router module and reset password page ngOnInit() code:</p>
  
  <pre><code>const routes: Routes = [
    {path: 'resetpassword?code=/:code', component: ResetpasswordComponent}
  ];
  
    ngOnInit() {
      debugger;
      const param = this.route.snapshot.paramMap.get('code');
      if(param) {
        this.Code = param;
      }
    }
  </code></pre>
  
  <p>I want to know:</p>
  
  <ol>
  <li>How can I set this route in my route definition?</li>
  <li>How will I read the value of code after code= in ngOnInit of reset password page ?</li>
  </ol>
  
  <p>Anyone who can guide me how can I build a route like this and read the params value?</p>