Post redesighn.
This commit is contained in:
parent
5d6360743f
commit
0f4b8e1cb2
@ -1,5 +1,7 @@
|
||||
<div class="post">
|
||||
<img *ngIf="post.ImgURL != '0'" src="{{post.ImgURL}}" alt="anonpls" width="140"> # {{post.Id}}
|
||||
<h3>{{post.Timestamp}}</h3>
|
||||
<h2>{{post.Text}}</h2>
|
||||
<p> # {{post.Id}} {{post.Timestamp}}</p>
|
||||
<a href="{{post.ImgURL}}" target="_blank">
|
||||
<img *ngIf="post.ImgURL != '0'" src="{{post.ImgURL}}" alt="anonpls" width="140">
|
||||
</a>
|
||||
<p>{{post.Text}}</p>
|
||||
</div>
|
||||
|
@ -11,13 +11,13 @@ export class ApiChatService {
|
||||
}
|
||||
|
||||
getPosts(): Observable<SinglePost[]> {
|
||||
console.log("Получаю посты и картинки");
|
||||
//console.log("Получаю посты и картинки");
|
||||
return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/');
|
||||
//return this.http.get<SinglePost[]>('http://localhost:7141/List/');
|
||||
}
|
||||
|
||||
sendPostToApi(text: string, imgUrl: string) {
|
||||
console.log("Отправляю пост...");
|
||||
//console.log("Отправляю пост...");
|
||||
var postToSend =
|
||||
{
|
||||
Timestamp: text,
|
||||
@ -25,7 +25,7 @@ export class ApiChatService {
|
||||
Text: text,
|
||||
ImgURL: imgUrl
|
||||
}
|
||||
console.log(postToSend)
|
||||
//console.log(postToSend)
|
||||
return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend)
|
||||
//return this.http.post('http://localhost:7141/PostTo', postToSend)
|
||||
|
||||
|
Reference in New Issue
Block a user