title: how we can access cookies in angular 6 without ngx- cookie service
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  login() : any {
      for(let data of this.loginsdata)
      if(this.username == data.usr &amp;&amp; this.password == data.pw){
        // this.toastr.success('logged in');
        console.log(this.username);
        console.log(this.password);
        
        this.router.navigate(['table']);
        
      }
      document.cookie =?</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;script type="text/javascript" src="typescript.compile.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to access a cookies in angular 6 without external module like ng-x cookie service. I wanted to use get set delete. is there any method? I have done with javascript approach like  document.cookie but its throwing error </p>