{"id":657,"date":"2023-10-07T17:49:01","date_gmt":"2023-10-07T23:49:01","guid":{"rendered":"https:\/\/kop.lat\/blog\/?p=657"},"modified":"2023-10-07T19:50:26","modified_gmt":"2023-10-08T01:50:26","slug":"render-data-in-an-angular-component-without-any-parent-child-relationship","status":"publish","type":"post","link":"https:\/\/kop.lat\/blog\/render-data-in-an-angular-component-without-any-parent-child-relationship\/","title":{"rendered":"Render data in an Angular component without any parent-child relationship"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<ol>\n<li><strong>Create a Service to Fetch Data:<\/strong> First, create a service that will fetch data from the API. Here&#8217;s a simple example of a service:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   <\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#D4F8FC\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\">\/\/ data.service.ts\n   import { Injectable } from '@angular\/core';\n   import { HttpClient } from '@angular\/common\/http';\n\n   @Injectable({\n     providedIn: 'root',\n   })\n   export class DataService {\n     private apiUrl = 'https:\/\/api.example.com\/data'; \/\/ Replace with your API URL\n\n     constructor(private http: HttpClient) {}\n\n     getData() {\n       return this.http.get(this.apiUrl);\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"2\">\n<li><strong>Initialize an Empty Array in the Service:<\/strong> As you mentioned, initialize an empty array in your service to hold the data.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   <\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#5E69FF\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\">\/\/ data.service.ts\n   import { Injectable } from '@angular\/core';\n   import { HttpClient } from '@angular\/common\/http';\n\n   @Injectable({\n     providedIn: 'root',\n   })\n   export class DataService {\n     private apiUrl = 'https:\/\/api.example.com\/data'; \/\/ Replace with your API URL\n     data: any[] = []; \/\/ Initialize an empty array\n\n     constructor(private http: HttpClient) {}\n\n     getData() {\n       return this.http.get(this.apiUrl);\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"3\">\n<li><strong>Fetch and Assign Data in a Component:<\/strong> In your component, you can inject the <code>DataService<\/code> and use it to fetch and assign the data to your array.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>  <\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#7FC8A9\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\"> \/\/ your-component.ts\n   import { Component, OnInit } from '@angular\/core';\n   import { DataService } from '.\/data.service';\n\n   @Component({\n     selector: 'app-your-component',\n     templateUrl: '.\/your-component.component.html',\n     styleUrls: ['.\/your-component.component.css'],\n   })\n   export class YourComponent implements OnInit {\n     constructor(private dataService: DataService) {}\n\n     ngOnInit() {\n       this.dataService.getData().subscribe((data: any[]) => {\n         this.dataService.data = data; \/\/ Assign fetched data to the service's data array\n       });\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"4\">\n<li><strong>Render Data in the Component&#8217;s Template:<\/strong> In your component&#8217;s HTML template, you can use <code>*ngFor<\/code> to loop through the data and render it.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- your-component.component.html --&gt;\n   &lt;div *ngFor=\"let item of dataService.data\"&gt;\n     &lt;!-- Render data properties as needed --&gt;\n     &lt;p&gt;{{ item.property1 }}&lt;\/p&gt;\n     &lt;p&gt;{{ item.property2 }}&lt;\/p&gt;\n     &lt;!-- Add more properties as needed --&gt;\n   &lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Another example:<\/h1>\n\n\n\n<p><\/p>\n\n\n\n<p>To render data in Angular with no parent component and fetch an array of objects from an API using a service, you can follow these steps:<\/p>\n\n\n\n<ol>\n<li><strong>Create a Service<\/strong>: First, create an Angular service that handles the API call. Run the following command in your Angular project&#8217;s root directory to generate a service:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ng generate service data<\/code><\/pre>\n\n\n\n<p>This will generate a service file (e.g., <code>data.service.ts<\/code>) in your <code>src\/app<\/code> directory.<\/p>\n\n\n\n<ol start=\"2\">\n<li><strong>Implement Data Fetching<\/strong>: Open the generated service file (<code>data.service.ts<\/code>) and implement the data fetching logic. Here&#8217;s a basic example:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#7FC8A9\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-php\">   import { Injectable } from '@angular\/core';\n   import { HttpClient } from '@angular\/common\/http';\n   import { Observable } from 'rxjs';\n\n   @Injectable({\n     providedIn: 'root',\n   })\n   export class DataService {\n     private apiUrl = 'https:\/\/api.example.com\/data'; \/\/ Replace with your API URL\n\n     constructor(private http: HttpClient) {}\n\n     fetchData(): Observable&lt;any[]> {\n       return this.http.get&lt;any[]>(this.apiUrl);\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<p>In this example, the <code>fetchData<\/code> method sends an HTTP GET request to the API and returns an Observable that emits an array of objects.<\/p>\n\n\n\n<ol start=\"3\">\n<li><strong>Render Data in a Component<\/strong>: Create a component to display the fetched data. For simplicity, let&#8217;s create a component called <code>DataComponent<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ng generate component data<\/code><\/pre>\n\n\n\n<p>Open the generated component file (<code>data.component.ts<\/code>) and use the service to fetch and render the data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#C9D8B6\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\">   import { Component, OnInit } from '@angular\/core';\n   import { DataService } from '..\/data.service';\n\n   @Component({\n     selector: 'app-data',\n     templateUrl: '.\/data.component.html',\n     styleUrls: ['.\/data.component.css'],\n   })\n   export class DataComponent implements OnInit {\n     data: any[] = []; \/\/ Initialize an empty array to hold the data\n\n     constructor(private dataService: DataService) {}\n\n     ngOnInit(): void {\n       \/\/ Fetch data from the service when the component initializes\n       this.dataService.fetchData().subscribe((result) => {\n         this.data = result; \/\/ Assign the fetched data to the 'data' property\n       });\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"4\">\n<li><strong>Render Data in the Component&#8217;s Template<\/strong>: Open the component&#8217;s template file (<code>data.component.html<\/code>) and render the data using Angular&#8217;s template syntax. For example:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;div *ngFor=\"let item of data\"&gt;\n     &lt;p&gt;{{ item.property1 }}&lt;\/p&gt;\n     &lt;p&gt;{{ item.property2 }}&lt;\/p&gt;\n     &lt;!-- Add more properties as needed --&gt;\n   &lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>Replace <code>property1<\/code>, <code>property2<\/code>, etc., with the actual properties from your data objects.<\/p>\n\n\n\n<ol start=\"5\">\n<li><strong>Add the Component to AppModule<\/strong>: Open the <code>app.module.ts<\/code> file and import the <code>DataComponent<\/code>. Then, add it to the <code>declarations<\/code> array:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   import { DataComponent } from '.\/data\/data.component';\n\n   @NgModule({\n     declarations: &#91;\n       \/\/ ... Other components\n       DataComponent,\n     ],\n     \/\/ ... Other module configuration\n   })<\/code><\/pre>\n\n\n\n<ol start=\"6\">\n<li><strong>Include the Component in Your Application<\/strong>: In your application&#8217;s routing or within another component&#8217;s template, include the <code>DataComponent<\/code> selector to render the data:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;app-data&gt;&lt;\/app-data&gt;<\/code><\/pre>\n\n\n\n<p>This will render the data fetched from the API using the <code>DataComponent<\/code>.<\/p>\n\n\n\n<ol start=\"7\">\n<li><strong>Start Your Application<\/strong>: Run your Angular application using the <code>ng serve<\/code> command:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ng serve<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">It will render if data is set<\/h1>\n\n\n\n<p>In Angular, to render data fetched from an API with no parent component, you can create a standalone component that fetches and displays the data. Here are the steps to do that:<\/p>\n\n\n\n<ol>\n<li><strong>Create a New Component<\/strong> (if you haven&#8217;t already): Use the Angular CLI to generate a new component. For example:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ng generate component data-display<\/code><\/pre>\n\n\n\n<ol start=\"2\">\n<li><strong>Service for Fetching Data<\/strong>: Create a service to handle API requests and data retrieval. In your service, use the <code>HttpClient<\/code> to make HTTP requests to your API.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#5E69FF\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\">\/\/ data.service.ts\n   import { Injectable } from '@angular\/core';\n   import { HttpClient } from '@angular\/common\/http';\n   import { Observable } from 'rxjs';\n\n   @Injectable({\n     providedIn: 'root'\n   })\n   export class DataService {\n     private apiUrl = 'https:\/\/api.example.com\/data'; \/\/ Replace with your API URL\n\n     constructor(private http: HttpClient) {}\n\n     fetchData(): Observable&lt;any> {\n       return this.http.get(this.apiUrl);\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"3\">\n<li><strong>Data Display Component<\/strong>: In your data display component, import the <code>DataService<\/code> and use it to fetch and display the data.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\" snippet-height=\"\" style=\"background-color:#FB8CFF\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-clike\">   \/\/ data-display.component.ts\n   import { Component, OnInit } from '@angular\/core';\n   import { DataService } from '..\/data.service';\n\n   @Component({\n     selector: 'app-data-display',\n     templateUrl: '.\/data-display.component.html',\n     styleUrls: ['.\/data-display.component.css']\n   })\n   export class DataDisplayComponent implements OnInit {\n     data: any; \/\/ Define a variable to hold the fetched data\n\n     constructor(private dataService: DataService) {}\n\n     ngOnInit(): void {\n       \/\/ Fetch data when the component is initialized\n       this.dataService.fetchData().subscribe((result) => {\n         this.data = result;\n       });\n     }\n   }<\/code><\/pre><\/div><\/div>\n\n\n\n<ol start=\"4\">\n<li><strong>HTML Template<\/strong>: Create an HTML template for your data display component to render the fetched data.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- data-display.component.html --&gt;\n   &lt;div *ngIf=\"data\"&gt;\n     &lt;h1&gt;Data Display Component&lt;\/h1&gt;\n     &lt;ul&gt;\n       &lt;li *ngFor=\"let item of data\"&gt;{{ item.name }}&lt;\/li&gt;\n     &lt;\/ul&gt;\n   &lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>Customize the template to display your specific data structure.<\/p>\n\n\n\n<ol start=\"5\">\n<li><strong>Add the Component to AppModule<\/strong>: Finally, add the <code>DataDisplayComponent<\/code> to your <code>AppModule<\/code> declarations.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/\/ app.module.ts\n   import { NgModule } from '@angular\/core';\n   import { BrowserModule } from '@angular\/platform-browser';\n   import { HttpClientModule } from '@angular\/common\/http';\n   import { AppComponent } from '.\/app.component';\n   import { DataDisplayComponent } from '.\/data-display\/data-display.component';\n\n   @NgModule({\n     declarations: &#91;AppComponent, DataDisplayComponent],\n     imports: &#91;BrowserModule, HttpClientModule],\n     providers: &#91;],\n     bootstrap: &#91;AppComponent]\n   })\n   export class AppModule {}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Rendering with a child component<\/h1>\n\n\n\n<p>To render data in Angular, you typically use Angular&#8217;s templates and components to display information in your web application. Here&#8217;s a high-level overview of the process:<\/p>\n\n\n\n<ol>\n<li><strong>Create a Component<\/strong>: First, create an Angular component to encapsulate the functionality and appearance of a specific part of your application. You can use the Angular CLI to generate a component:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ng generate component my-component<\/code><\/pre>\n\n\n\n<ol start=\"2\">\n<li><strong>Define Data<\/strong>: In your component, define the data you want to render. You can use class properties to hold the data you want to display.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/\/ my-component.component.ts\n   import { Component } from '@angular\/core';\n\n   @Component({\n     selector: 'app-my-component',\n     templateUrl: '.\/my-component.component.html',\n     styleUrls: &#91;'.\/my-component.component.css']\n   })\n   export class MyComponent {\n     data = 'Hello, World!'; \/\/ Example data\n   }<\/code><\/pre>\n\n\n\n<ol start=\"3\">\n<li><strong>Create a Template<\/strong>: Create an HTML template for your component to define how the data should be rendered. Use Angular&#8217;s interpolation (<code>{{ }}<\/code>) to display the data in the template.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- my-component.component.html --&gt;\n   &lt;div&gt;\n     &lt;h1&gt;{{ data }}&lt;\/h1&gt;\n   &lt;\/div&gt;<\/code><\/pre>\n\n\n\n<ol start=\"4\">\n<li><strong>Use the Component<\/strong>: Add your component to the parent component&#8217;s template or route to make it part of your application&#8217;s user interface.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- parent-component.component.html --&gt;\n   &lt;app-my-component&gt;&lt;\/app-my-component&gt;<\/code><\/pre>\n\n\n\n<ol start=\"5\">\n<li><strong>Displaying Lists of Data<\/strong>: If you want to render a list of items, you can use Angular&#8217;s <code>*ngFor<\/code> directive in your template.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/\/ my-component.component.ts\n   import { Component } from '@angular\/core';\n\n   @Component({\n     selector: 'app-my-component',\n     templateUrl: '.\/my-component.component.html',\n     styleUrls: &#91;'.\/my-component.component.css']\n   })\n   export class MyComponent {\n     items = &#91;'Item 1', 'Item 2', 'Item 3'];\n   }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- my-component.component.html --&gt;\n   &lt;ul&gt;\n     &lt;li *ngFor=\"let item of items\"&gt;{{ item }}&lt;\/li&gt;\n   &lt;\/ul&gt;<\/code><\/pre>\n\n\n\n<ol start=\"6\">\n<li><strong>Binding to Input Properties<\/strong>: If your component receives data from its parent component, you can use input properties to bind data to your component.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/\/ child-component.component.ts\n   import { Component, Input } from '@angular\/core';\n\n   @Component({\n     selector: 'app-child-component',\n     templateUrl: '.\/child-component.component.html',\n     styleUrls: &#91;'.\/child-component.component.css']\n   })\n   export class ChildComponent {\n     @Input() dataFromParent: string;\n   }<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>   &lt;!-- parent-component.component.html --&gt;\n   &lt;app-child-component &#91;dataFromParent]=\"data\"&gt;&lt;\/app-child-component&gt;<\/code><\/pre>\n\n\n\n<p>These are the basic steps for rendering data in Angular. You can create more complex templates, use data-binding, and leverage Angular&#8217;s powerful features to build dynamic and interactive user interfaces.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another example: To render data in Angular with no parent component and fetch an array of objects from an API using a service, you can follow these steps: This will generate a service file (e.g., data.service.ts) in your src\/app directory. In this example, the fetchData method sends an HTTP GET request to the API and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":455,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[109,101,49],"tags":[],"_links":{"self":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/657"}],"collection":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/comments?post=657"}],"version-history":[{"count":6,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/657\/revisions"}],"predecessor-version":[{"id":667,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/657\/revisions\/667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media\/455"}],"wp:attachment":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media?parent=657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/categories?post=657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/tags?post=657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}