Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
toppic1
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jakkree kongpha
toppic1
Commits
2260116f
Commit
2260116f
authored
Jul 22, 2020
by
jakkree kongpha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mock Lecturer Score Course
parent
e1da52af
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
0 deletions
+57
-0
app.component.html
22-july-2020/topic1/src/app/app.component.html
+4
-0
app.component.ts
22-july-2020/topic1/src/app/app.component.ts
+5
-0
mock-course.ts
22-july-2020/topic1/src/app/mock/mock-course.ts
+9
-0
mock-lecturer.ts
22-july-2020/topic1/src/app/mock/mock-lecturer.ts
+10
-0
mock-score.ts
22-july-2020/topic1/src/app/mock/mock-score.ts
+9
-0
Lecturer.ts
22-july-2020/topic1/src/app/models/Lecturer.ts
+4
-0
Score.ts
22-july-2020/topic1/src/app/models/Score.ts
+5
-0
course.ts
22-july-2020/topic1/src/app/models/course.ts
+4
-0
student.ts
22-july-2020/topic1/src/app/models/student.ts
+7
-0
No files found.
22-july-2020/topic1/src/app/app.component.html
View file @
2260116f
...
@@ -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>
22-july-2020/topic1/src/app/app.component.ts
View file @
2260116f
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
;
}
}
22-july-2020/topic1/src/app/mock/mock-course.ts
0 → 100644
View file @
2260116f
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'
},
];
22-july-2020/topic1/src/app/mock/mock-lecturer.ts
0 → 100644
View file @
2260116f
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'
},
];
22-july-2020/topic1/src/app/mock/mock-score.ts
0 → 100644
View file @
2260116f
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
},
];
22-july-2020/topic1/src/app/models/Lecturer.ts
0 → 100644
View file @
2260116f
export
interface
Lecturer
{
id
:
number
;
name
:
string
;
}
22-july-2020/topic1/src/app/models/Score.ts
0 → 100644
View file @
2260116f
export
interface
Score
{
student
:
string
;
score
:
number
;
full_mark
:
number
;
}
22-july-2020/topic1/src/app/models/course.ts
0 → 100644
View file @
2260116f
export
interface
Course
{
title
:
string
;
description
:
string
;
}
22-july-2020/topic1/src/app/models/student.ts
View file @
2260116f
...
@@ -3,3 +3,10 @@ export interface Student {
...
@@ -3,3 +3,10 @@ export interface Student {
name
:
string
;
name
:
string
;
email
:
string
;
email
:
string
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment