소스 검색

error getting post entries

master
Daniel 2 년 전
부모
커밋
4de1f03e5d
3개의 변경된 파일30개의 추가작업 그리고 12개의 파일을 삭제
  1. +5
    -5
      matsen-tool/src/app/app.component.html
  2. +23
    -6
      matsen-tool/src/app/app.component.ts
  3. +2
    -1
      matsen-tool/src/environment.ts

+ 5
- 5
matsen-tool/src/app/app.component.html 파일 보기

@@ -1,11 +1,11 @@

<app-login></app-login>
<!--<ul>-->
<!-- <li>Posts</li>-->
<!-- <li *ngFor="let post of posts$ | async">-->
<!-- <h2>{{post.}} - {{post.owner}}</h2>-->
<ul>
<li>Posts</li>
<!-- <li *ngFor="let post of posts">-->
<!-- <h2>{{post.id}} - {{post.owner}}</h2>-->
<!-- <p>{{post.message}}</p>-->
<!-- </li>-->
<!--</ul>-->
</ul>

<router-outlet></router-outlet>

+ 23
- 6
matsen-tool/src/app/app.component.ts 파일 보기

@@ -1,14 +1,31 @@
import { Component } from '@angular/core';
// import { PostService } from './core/api/v1';
import {Component, OnInit} from '@angular/core';
import {ApiPostsGetCollection200Response, PostJsonld, PostService} from "./core/api/v1";
import {Observable, Subscription} from "rxjs";

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
})
export class AppComponent {
title = 'matsen-tool';
// posts$ = this.postService.postsGetCollection();
export class AppComponent implements OnInit{
title = 'matsen-tool';
protected postSub: Subscription;
protected posts: Array<PostJsonld>;

constructor(private postService: PostService) {
this.postSub = new Subscription();
this.posts = [];
}

ngOnInit(): void {
this.postSub = this.postService.postsGetCollection().subscribe(
data => {

this.posts = data.hydramember;
console.log(data);
}
);

}

// constructor(private postService: PostService) {}
}

+ 2
- 1
matsen-tool/src/environment.ts 파일 보기

@@ -1,4 +1,5 @@
export const environment = {
production: false,
basePath: 'https://matsen-tool-be.ddev.site:8443',
// basePath: 'https://matsen-tool-be.ddev.site:8443',
basePath: 'https://127.0.0.1:49858',
};

불러오는 중...
취소
저장