title: How pass array in angular 2 service to an asp.net web API?
body: <p>I have checkboxes in angular 2 view side, and when I click one of the checkboxes and click the button I get values of the selected checkbox.And this value or id I pass into service and call my asp.net Web API, Here is my view</p>
  
  <pre><code>&lt;div&gt;
      &lt;label&gt;
           &lt;input class="checkbox" type="checkbox" name="cbox1" value="1" &gt;Armani                                             
      &lt;/label&gt;           
      &lt;label&gt;
           &lt;input class="checkbox" type="checkbox" name="cbox1" value="2" &gt;Versace
      &lt;/label&gt;
      &lt;button type="submit" id="select" class="btn btn-default btn-sm btn-primary"&gt;Apply&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In my component</p>
  
  <pre><code>  var self = this;            
              $(document).ready(function () {                                                         
                $('#select').click(function () {
                     var seletedId = new Array();
                      $('input:checkbox.checkbox').each(function () {
                          if ($(this).prop('checked')) {
                                         seletedId.push($(this).val());                                      
                                      }
                                      });
                                      if (seletedId.length &gt; 0) {
                                          self.getProductBrand(seletedId);
                                      }
                                  })                            
                              });
  </code></pre>
  
  <p>With this i call function</p>
  
  <pre><code> getProductBrand(ids: Array&lt;number&gt;) {           
              this._productService.getProductBrand(ids).subscribe(data =&gt; {
                  console.log();
              }, error =&gt; { this.errorMessage = error });
          }
  </code></pre>
  
  <p>In Web API </p>
  
  <pre><code>[HttpGet]        
  [Route("api/user/brand/{id}")]
  public Producttbl getProduBrand([FromUri] int[] id)
  {
       //
  }
  </code></pre>
  
  <p>So how to pass an array from angular 2 and how to fetch in web API?
  Through above code, it gets error like zone.js:2935 GET </p>
  
  <p><code>http://localhost:58266/api/user/productbybrand/1,2 404 not found</code></p>