title: How to convert string to boolean in typescript Angular 4
body: <p>I know am not the first to ask this and as I mentioned in my title ,I am trying to convert string value boolean .</p>
  
  <p>I have previously put some values into local storage,Now I want to get all the values and assign all to the some boolean variables .</p>
  
  <p>app.component.ts</p>
  
  <pre><code>localStorage.setItem('CheckOutPageReload', this.btnLoginNumOne + ',' + this.btnLoginEdit);
  </code></pre>
  
  <p>here <code>this.btnLoginNumOne</code>  and <code>this.btnLoginEdit</code> are string values <strong>("true,false")</strong>.</p>
  
  <p>mirror.component.ts</p>
  
  <pre><code>if (localStorage.getItem('CheckOutPageReload')) {
        let stringToSplit = localStorage.getItem('CheckOutPageReload');
        this.pageLoadParams = stringToSplit.split(',');
  
        this.btnLoginNumOne = this.pageLoadParams[0]; //here I got the error as boolean value is not assignable to string
        this.btnLoginEdit = this.pageLoadParams[1]; //here I got the error as boolean value is not assignable to string
  }
  </code></pre>
  
  <p>in this component <code>this.btnLoginNumOn</code>e and <code>this.btnLoginEdi</code>t are <strong>Boolean</strong> values;</p>
  
  <p>I tried the solutions in stackoverflow but nothing is worked.</p>
  
  <p>Can anyone help me to fix this .</p>