酢日報

ch3coohの日報。このブログはひっそりと運営しています

2017-07-13 ch3cooh

仕事

サーバー講習会

昨日の続き。jsonが表示できていなかった理由がわかった。

src/app/app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from "@angular/router";

import { AppComponent } from './app.component';
import { PostsComponent } from './posts/posts.component';
import { PostsService } from "./posts.service";
import {FormsModule} from "@angular/forms";
import {HttpModule} from "@angular/http";

// Define the routes
const ROUTES = [
  {
    path: '',
    redirectTo: 'posts',
    pathMatch: 'full'
  },
  {
    path: 'posts',
    component: PostsComponent
  }
];

@NgModule({
  declarations: [
    AppComponent,
    PostsComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    RouterModule.forRoot(ROUTES) // Add routes to the app
  ],
  providers: [PostsService],
  bootstrap: [AppComponent]
})
export class AppModule { }

こんな感じ。

f:id:ch3cooh393:20170713145651p:plain

スプラトゥーン

イイダさんかわいい。

イイダさんかわいい #スプラトゥーン #イイダ #テンタクルズsketch.pixiv.net