36 lines
1000 B
TypeScript
36 lines
1000 B
TypeScript
import { BlackConnectService } from './../api/black-connect.service';
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
|
|
@Component({
|
|
selector: 'app-blog',
|
|
templateUrl: './blog.page.html',
|
|
styleUrls: ['./blog.page.scss'],
|
|
})
|
|
export class BlogPage implements OnInit {
|
|
CurrentDate = new Date().getDate();
|
|
blogData: any;
|
|
constructor(private blackConnectService: BlackConnectService) {
|
|
this. getBlog();
|
|
}
|
|
image_url = "https://blog.chiefsoft.com/wp-content/uploads/";
|
|
ngOnInit() {
|
|
this. getBlog();
|
|
}
|
|
|
|
blog_list: any;
|
|
getBlog() {
|
|
this.blackConnectService.blogData("blackblog").subscribe((retBlogData) => {
|
|
this.blogData = retBlogData;
|
|
//console.log(this.blogData);
|
|
//console.log(this.blogData["internal_return"]["result_list"]);
|
|
this.image_url= this.blogData["internal_return"]["image_url"];
|
|
this.blog_list = this.blogData["internal_return"]["result_list"];
|
|
console.log(this.blog_list);
|
|
})
|
|
|
|
}
|
|
|
|
|
|
}
|