{"action":"opened","issue":{"url":"https://api.github.com/repos/neroniaky/angular2-token/issues/34","repository_url":"https://api.github.com/repos/neroniaky/angular2-token","labels_url":"https://api.github.com/repos/neroniaky/angular2-token/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/neroniaky/angular2-token/issues/34/comments","events_url":"https://api.github.com/repos/neroniaky/angular2-token/issues/34/events","html_url":"https://github.com/neroniaky/angular2-token/issues/34","id":179585450,"number":34,"title":"How access current user ID from a Service?","user":{"login":"gbrl","id":733896,"avatar_url":"https://avatars.githubusercontent.com/u/733896?v=3","gravatar_id":"","url":"https://api.github.com/users/gbrl","html_url":"https://github.com/gbrl","followers_url":"https://api.github.com/users/gbrl/followers","following_url":"https://api.github.com/users/gbrl/following{/other_user}","gists_url":"https://api.github.com/users/gbrl/gists{/gist_id}","starred_url":"https://api.github.com/users/gbrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbrl/subscriptions","organizations_url":"https://api.github.com/users/gbrl/orgs","repos_url":"https://api.github.com/users/gbrl/repos","events_url":"https://api.github.com/users/gbrl/events{/privacy}","received_events_url":"https://api.github.com/users/gbrl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-27T19:10:12Z","updated_at":"2016-09-27T19:10:12Z","closed_at":null,"body":"I have two models, User and Profile, and I want my Profile Service to be able to call the API using the current logged-in users' ID. I can't figure out how to do this. Any advice is appreciated. Here is my service:\r\n\r\n    import { Injectable } from '@angular/core';\r\n    import { Http, Headers, RequestOptions } from '@angular/http';\r\n\r\n    @Injectable()\r\n    export class ProfileService {\r\n\r\n      constructor(private http: Http) {}\r\n\r\n      find() {\r\n        return this.http.get('/api/user/22/profile.json');\r\n      }\r\n\r\n    }\r\n\r\nBasically, I need \r\n\r\n    'api/user/22/profile.json'\r\n\r\nto behave like \r\n\r\n    'api/user/' +  user.id + '/profile.json"}}
{"actor":{"display_login":"gbrl"}}