Commit 2260116f authored by jakkree kongpha's avatar jakkree kongpha

add mock Lecturer Score Course

parent e1da52af
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
<div class="card highlight-card card-small">{{ s.id }}</div> <div class="card highlight-card card-small">{{ s.id }}</div>
<span>{{ s.name }} {{ s.email }}</span> <span>{{ s.name }} {{ s.email }}</span>
</div> </div>
<div *ngFor="let c of course" class="card">
<div class="card highlight-card card-small">{{ c.title }}</div>
<span>{{ c.description }}</span>
</div>
</div> </div>
</div> </div>
<router-outlet></router-outlet> <router-outlet></router-outlet>
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Student } from './models/student'; import { Student } from './models/student';
import { Course } from './models/course';
import { Lecturer } from './models/Lecturer';
import { STUDENTS } from './mock/mock-students'; import { STUDENTS } from './mock/mock-students';
import { COURSE } from './mock/mock-course';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
...@@ -11,4 +15,5 @@ export class AppComponent { ...@@ -11,4 +15,5 @@ export class AppComponent {
title = 'Course Web Application'; title = 'Course Web Application';
description = 'คำอธิบายรายวิชา'; description = 'คำอธิบายรายวิชา';
students: Student[] = STUDENTS; students: Student[] = STUDENTS;
course: Course[] = COURSE;
} }
import { Course } from '../models/course';
export const COURSE: Course[] = [
{ title: 'topic1', description: 'For Conputer science Studdent' },
{ title: 'topic2', description: 'For Conputer science Studdent' },
{ title: 'Linear', description: 'For Conputer science Studdent' },
{ title: 'Wireless Network', description: 'For Conputer science Studdent' },
{ title: 'Advance Wireless Network', description: 'For Conputer science Studdent' },
];
import {} from '../models/Score';
import { Lecturer } from '../models/Lecturer';
export const LECTURER: Lecturer[] = [
{ id: 590001, name: 'warawut' },
{ id: 590002, name: 'Jirutchaya' },
{ id: 590003, name: 'panuwut' },
{ id: 590004, name: 'prompong' },
{ id: 590003, name: 'paichayon' },
];
import { Score } from '../models/Score';
export const SCORE: Score[] = [
{ student: 'jakkree', score: 80, full_mark: 100 },
{ student: 'jirawut', score: 60, full_mark: 100 },
{ student: 'niyong', score: 65, full_mark: 100 },
{ student: 'apinya', score: 70, full_mark: 100 },
{ student: 'nipaporn', score: 90, full_mark: 100 },
];
export interface Lecturer {
id: number;
name: string;
}
export interface Score {
student: string;
score: number;
full_mark: number;
}
export interface Course {
title: string;
description: string;
}
...@@ -3,3 +3,10 @@ export interface Student { ...@@ -3,3 +3,10 @@ export interface Student {
name: string; name: string;
email: string; email: string;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment