从"Blog"仓库中分离出来

This commit is contained in:
小海
2019-11-28 19:26:45 +08:00
commit c2aaf280db
616 changed files with 104128 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import {Injectable} from '@angular/core';
import {HttpService} from '../http.service';
@Injectable({
providedIn: 'root'
})
export class LogService {
constructor(private http: HttpService) {
}
logText: string;
getLog() {
// @ts-ignore
const observable = this.http.httpClient.get<string>('https://api.celess.cn/blog.log', {responseType: 'text'});
observable.subscribe(data => {
this.logText = data;
});
return observable;
}
}