title: Angular context binding
body: <p>Hello I have problem probably with context function binding. </p>
  
  <p>This is my AddDialogComponent which contains a FormGroup with code FormControl inside validated by injected ProductValidator:</p>
  
  <pre><code>constructor(
  public productValidator: ProductValidator,
  //.....
   code = new FormControl('', [
      this.productValidator.validateCodeLength.bind(this.productValidator),
      this.productValidator.validateCodeUnique.bind(this.productValidator)]);
  </code></pre>
  
  <p>ProductValidator's function:</p>
  
  <pre><code> validateCodeUnique(input: FormControl) {
      const code: string = input.value;
      let isUnique = true;
      this.productService.getAllProducts().forEach((product, key) =&gt; {
        console.log(product);
        if (product.code === code) {
          isUnique = false;
        }
      });
      return isUnique ? null : { notUnique: true };
    }
  </code></pre>
  
  <p>And here <code>getAllProducts()</code> returns empty map but inside productService it shows 5 elements. fillMapProducts is called on initializing, the <code>console.log</code> printlns 5 items inside map, but later when I'm calling <code>getAllProducts()</code> in ProductValidator it shows that map is empty</p>
  
  <pre><code>fillMapProducts(products: ProductAdmin[]): ProductAdmin[] {
          products.forEach(product =&gt; this.allProducts.set(product.id, product));
      console.log(this.allProducts(); // 5 elements
        }
  
        getAllProducts(): Map&lt;number, ProductAdmin&gt; {
          return this.allProducts; // empty map when called inside ProductValidator
     }
  </code></pre>
  
  <p>I <a href="https://stackoverflow.com/questions/50977923/injecting-service-with-injected-service" title="asked">asked</a>  about that sometime ago and It worked very well - now I have no idea what should I do - I tried with some other bindings but didn't get expected results. Could someone help?</p>