passing multiple querystrings returning undefined in angular
<p>I'm trying to pass multiple query params back to my apiEnd point however its returning me <code>undefined</code>. I managed to get the strings that I needed without passing it to the <code>http.get</code> request.</p>

<p>So it splits the value from the input field into array objs, and this is returning me the array just fine but once I put it in the <code>get</code> request function its returns <code>/api/prodcutsundefined</code></p>

<pre><code>splitValue(event) {
    var idInputValue = this.productId.split(' ');
    console.log(idInputValue);
    if(idInputValue) {
        var ids = idInputValue;
        var queryString = "?";
        for (var i = 0; i &lt; ids.length; i++) {
            var id = ids[i];
            if (i &gt; 0) {
                queryString += "&amp;";
            }
            queryString += ("id="+id);
            console.log(queryString);
        }
    }
}
</code></pre>

<p>with the api end point passing the queryString back, seems like <code>this.queryString</code> is not being pass back in the <code>url</code>. How can I pass</p>

<pre><code>getProduct() {
        this.http.get('http:../api/Products'+this.queryString)
        .map(response =&gt; response.text())
        .subscribe(data =&gt; {
            if(data) {
                // var productObj = JSON.parse(data);
                this.productId = JSON.parse(data).Id;

                var idInputValue = this.productId.split(' ');
                console.log(idInputValue);
                if(idInputValue) {
                    var ids = idInputValue;
                    var queryString = "?";
                    for (var i = 0; i &lt; ids.length; i++) {
                        var id = ids[i];
                        if (i &gt; 0) {
                            queryString += "&amp;";
                        }
                        this.queryString += ("id="+id);
                        console.log(queryString);
                }
            }
        }
    });
}
</code></pre>