I thought this would be a simple task, but for some reason I can't seem to get it right. I am working on an ionic app for a wordpress blog and trying to retrieve a single post by its id. I have confirmed that the id is being passed correctly, but when I make an http.get call, the id gets modified to
http://myURL/wp-json/wp/v2/posts/%7Bid%7D
Here is my code:
// Load a single post
loadSinglePost(id:number): Observable<Post[]> {
return this.http.get('http://bongosoka.com/wp-json/wp/v2/posts/${id}')
.map(res => <Post[]>res.json());
}
How can I ensure that the actual id is returned?