title: Split string based on spaces and read that in angular2
body: <p>I am creating a pipe in angular2 where I want to split the string on white spaces and later on read it as an array.</p>
  
  <pre><code>let stringToSplit = "abc def ghi";
  StringToSplit.split(" ");
  console.log(stringToSplit[0]);
  </code></pre>
  
  <p>When I log this, I always get "a" as output. Where I am going wrong?</p>