This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { User } from '../../models'; | |
| import { PostService } from '../post'; | |
| @Injectable() | |
| export class UserService { | |
| public db: User[] = []; | |
| constructor(private postService: PostService) {} | |
| insert(user: User) : void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Post } from '../../../models'; | |
| export interface PostState { | |
| data: Post | null; | |
| posts: Post[] | null; | |
| } | |
| export const initialPostState: PostState = { | |
| data: null, | |
| posts: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { User } from './User'; | |
| export interface Post { | |
| id: number; | |
| title: string; | |
| content: string; | |
| createdAt: Date; | |
| author: User | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { User } from '../../../models'; | |
| export interface UserState { | |
| data: User | null; | |
| users: User[] | null; | |
| } | |
| export const initialUserState : UserState = { | |
| data: null, | |
| users: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { User } from '../../../models'; | |
| export interface UserState { | |
| data: User | null; | |
| users: User[] | null; | |
| } | |
| export const initialUserState : UserState = { | |
| data: null, | |
| users: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| //The move class. This will be instantiated with a row and column argument passed based on user input | |
| class Move { | |
| int r; | |
| int c; | |
| Move(int r, int c) { | |
| this.r=r; | |
| this.c=c; |
NewerOlder