How to add csrf token to angular 2 application
<p>I have enabled the CSRF in the java back-end (in <strong>SecurityConfig.java</strong> file)   due to maintain user sessions between the angular2 and spring app. but when the post submission fired, I haven't seen any CSRF token binded to the POST request.</p>

<p><a href="https://i.stack.imgur.com/YypP3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YypP3.png" alt="enter image description here"></a>      </p>

<p>How would be possible way to add the <strong>CSRF</strong> token to my <strong>angular2</strong> app.
(add to the post request )</p>

<hr>

<p>loginService.ts</p>

<pre><code>  userLogin(loginDTO){
    let headers = new Headers({ 'Content-Type': 'application/json' });
    let options = new RequestOptions({ headers: headers });

    var result = this._http.post(this._rest_service_login, JSON.stringify(loginDTO),options)
        .map(res =&gt; res.json());
    return result;
}
</code></pre>