title: resolver with parameter on resolve method
body: <p>So I implemented a resolver in angular 5:</p>
  
  <pre class="lang-js prettyprint-override"><code>@Injectable()
  export class AppResolver implements Resolve&lt;MyComplexObject []&gt; {
    constructor(private myService: MyService) {
  
     }
     resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable&lt;MyComplexObject[]&gt; {
       return this.myService.getMyApi(myOption); // my option is a string
     }
  }
  </code></pre>
  
  <p>right now myOption is a hardcoded string and i want to change that</p>
  
  <p>in my routing module i have:</p>
  
  <pre class="lang-js prettyprint-override"><code>resolve: {
    myResolver: AppResolver
  }
  </code></pre>
  
  <p>I suppose maybe here I should specify the value of myOption string but how?</p>
  
  <p>or better yet where I actually call the resolver</p>
  
  <pre class="lang-js prettyprint-override"><code>this.route.data.map(data =&gt; data.myResolver).subscribe(
    result =&gt; {
      // do something with the result (specify who the myOption is?? How)
    }
  );
  </code></pre>
  
  <p>the parameter is not necessarily visible in the browser :</p>
  
  <p>it will be part of the url: /.../.../myString/..</p>
  
  <p>but it's not introduced by a param : url: /..&amp;myParam=paramValue</p>
  
  <p>so I can t use myParam to identify it from the url and replace it</p>