content-keyword.ts 1.52 KB
import { Injectable } from '@angular/core';
import { Keyword } from './define-keyword';
/*
  Generated class for the DataService provider.

  See https://angular.io/docs/ts/latest/guide/dependency-injection.html
  for more info on providers and Angular 2 DI.
*/
@Injectable()
export class ContentsKeyword {
    keyword: Keyword[];

    constructor() {
        this.keyword = this.createKeyword();
    }

  private createKeyword(): Keyword[] {
     var keyword = [{
        menuId: 0, //6文字
        words: ["う","ご","う","こ","い","せ"],
        answer: 'こうごうせい'
      }, {
        menuId: 1, //7文字
        words: ["あ","ん","り","べ","し","だ","き"],
        answer: 'しべりあきだん'
      }, {
        menuId: 2, //7文字
        words: ["し","う","る","い","そ","よ","う"],
        answer: 'そうしようるい'
      }, {
        menuId: 3, //6文字
        words: ["へ","く","ん","か","が","か"],
        answer: 'かがくへんか'
      }, {
        menuId: 4, //5文字
        words: ["ゆ","ぶ","う","き","つ"],
        answer: 'ゆうきぶつ'
      }, {
        menuId: 5, //7文字
        words: ["こ","と","ど","み","ん","あ","り"],
        answer: 'みとこんどりあ'
      }, {
        menuId: 6, //6文字
        words: ["か","お","せ","い","う","い"],
        answer: 'かいおうせい'
      }, {
        menuId: 7, //6文字
        words: ["く","ぼ","ま","さ","い","う"],
        answer: 'さいぼうまく'
      }];

      return keyword;
  }

}