@@ -26,7 +26,7 @@ <h2 class="mt-0">Game Details</h2>
26
26
<!-- Country -->
27
27
< p > Categories:</ p >
28
28
< label class ="youplay-select ">
29
- < select [(ngModel)] ="category " aria-placeholder = this. game.category>
29
+ < select [(ngModel)] ="game. category " value =" game.category " >
30
30
< option value =""> Select Category</ option >
31
31
< option value ="Action "> Action</ option >
32
32
< option value ="Adventure "> Adventure</ option >
@@ -38,7 +38,7 @@ <h2 class="mt-0">Game Details</h2>
38
38
< option value ="Strategy "> Strategy</ option >
39
39
</ select >
40
40
</ label >
41
- < div class ="wrong " [class.display-div] ="checkEmpty(category) ">
41
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. category) ">
42
42
< p > Select one category! </ p >
43
43
</ div >
44
44
< div class ="row ">
@@ -47,7 +47,7 @@ <h2 class="mt-0">Game Details</h2>
47
47
< div class ="youplay-input ">
48
48
< input [(ngModel)] ="game.name " value ="game.name " />
49
49
</ div >
50
- < div class ="wrong " [class.display-div] ="checkEmpty(name) ">
50
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. name) ">
51
51
< p > The name cant be empty! </ p >
52
52
</ div >
53
53
</ div >
@@ -57,8 +57,8 @@ <h2 class="mt-0">Game Details</h2>
57
57
< input
58
58
type ="number "
59
59
step ="0.01 "
60
- [(ngModel)] ="price "
61
- placeholder = this. game.price
60
+ [(ngModel)] ="game. price "
61
+ value = " game.price "
62
62
required
63
63
/>
64
64
</ div >
@@ -71,9 +71,9 @@ <h2 class="mt-0">Game Details</h2>
71
71
< div class ="col-md-4 ">
72
72
< p > OS:</ p >
73
73
< div class ="youplay-input ">
74
- < input type ="text " [(ngModel)] ="os " placeholder = this. game.os required />
74
+ < input type ="text " [(ngModel)] ="game. os " value = " game.os " />
75
75
</ div >
76
- < div class ="wrong " [class.display-div] ="checkEmpty(os) ">
76
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. os) ">
77
77
< p > The OS cant be empty! </ p >
78
78
</ div >
79
79
</ div >
@@ -82,21 +82,20 @@ <h2 class="mt-0">Game Details</h2>
82
82
< div class ="youplay-input ">
83
83
< input
84
84
type ="text "
85
- [(ngModel)] ="processor "
86
- placeholder =this.game.processor
87
- required
85
+ [(ngModel)] ="game.processor "
86
+ value ="game.processor "
88
87
/>
89
88
</ div >
90
- < div class ="wrong " [class.display-div] ="checkEmpty(processor) ">
89
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. processor) ">
91
90
< p > The processor cant be empty! </ p >
92
91
</ div >
93
92
</ div >
94
93
< div class ="col-md-4 ">
95
94
< p > Memory:</ p >
96
95
< div class ="youplay-input ">
97
- < input type ="text " [(ngModel)] ="memory " placeholder = this. game.memory required />
96
+ < input type ="text " [(ngModel)] ="game. memory " value =" game.memory " />
98
97
</ div >
99
- < div class ="wrong " [class.display-div] ="checkEmpty(memory) ">
98
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. memory) ">
100
99
< p > The Memory cant be empty! </ p >
101
100
</ div >
102
101
</ div >
@@ -108,12 +107,11 @@ <h2 class="mt-0">Game Details</h2>
108
107
< div class ="youplay-input ">
109
108
< input
110
109
type ="text "
111
- [(ngModel)] ="directX "
112
- placeholder =this.game.directX
113
- required
110
+ [(ngModel)] ="game.directX "
111
+ value = "game.directX "
114
112
/>
115
113
</ div >
116
- < div class ="wrong " [class.display-div] ="checkEmpty(directX) ">
114
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. directX) ">
117
115
< p > The DirectX cant be empty! </ p >
118
116
</ div >
119
117
</ div >
@@ -122,12 +120,11 @@ <h2 class="mt-0">Game Details</h2>
122
120
< div class ="youplay-input ">
123
121
< input
124
122
type ="text "
125
- [(ngModel)] ="network "
126
- placeholder =this.game.network
127
- required
123
+ [(ngModel)] ="game.network "
124
+ value = "game.network "
128
125
/>
129
126
</ div >
130
- < div class ="wrong " [class.display-div] ="checkEmpty(network) ">
127
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. network) ">
131
128
< p > The network cant be empty! </ p >
132
129
</ div >
133
130
</ div >
@@ -138,12 +135,11 @@ <h2 class="mt-0">Game Details</h2>
138
135
< div class ="youplay-input ">
139
136
< input
140
137
type ="text "
141
- [(ngModel)] ="hardDrive "
142
- placeholder =this.game.hardDrive
143
- required
138
+ [(ngModel)] ="game.hardDrive "
139
+ value = "game.hardDrive "
144
140
/>
145
141
</ div >
146
- < div class ="wrong " [class.display-div] ="checkEmpty(hardDrive) ">
142
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. hardDrive) ">
147
143
< p > The Hard Drive cant be empty! </ p >
148
144
</ div >
149
145
</ div >
@@ -152,12 +148,11 @@ <h2 class="mt-0">Game Details</h2>
152
148
< div class ="youplay-input ">
153
149
< input
154
150
type ="text "
155
- [(ngModel)] ="soundcard "
156
- placeholder =this.game.soundcard
157
- required
151
+ [(ngModel)] ="game.soundCard "
152
+ value = "game.soundCard "
158
153
/>
159
154
</ div >
160
- < div class ="wrong " [class.display-div] ="checkEmpty(soundcard ) ">
155
+ < div class ="wrong " [class.display-div] ="checkEmpty(game.soundCard ) ">
161
156
< p > The Sound Card cant be empty! </ p >
162
157
</ div >
163
158
</ div >
@@ -168,12 +163,11 @@ <h2 class="mt-0">Game Details</h2>
168
163
< div class ="youplay-input ">
169
164
< input
170
165
type ="text "
171
- [(ngModel)] ="graphics "
172
- placeholder =this.game.graphics
173
- required
166
+ [(ngModel)] ="game.graphics "
167
+ value = "game.graphics "
174
168
/>
175
169
</ div >
176
- < div class ="wrong " [class.display-div] ="checkEmpty(graphics) ">
170
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. graphics) ">
177
171
< p > The Graphic cant be empty! </ p >
178
172
</ div >
179
173
</ div >
@@ -186,7 +180,7 @@ <h2 class="mt-0">Game Details</h2>
186
180
</ div > </ label
187
181
>
188
182
< div class ="imageInput ">
189
- < input type ="file " id ='imageUpload ' accept ="image/jpeg,image/png " (change) ="onFileSelected($event) " required />
183
+ < input type ="file " id ='imageUpload ' accept ="image/jpeg,image/png " (change) ="onFileSelected($event) "/>
190
184
</ div >
191
185
192
186
< label for ="imageUploads ">
@@ -195,18 +189,17 @@ <h2 class="mt-0">Game Details</h2>
195
189
</ div > </ label
196
190
>
197
191
< div class ="imageInput ">
198
- < input id ='imageUploads 'type ="file " multiple accept ="image/jpeg,image/png " (change) ="onFilesSelected($event) " required />
192
+ < input id ='imageUploads 'type ="file " multiple accept ="image/jpeg,image/png " (change) ="onFilesSelected($event) "/>
199
193
</ div >
200
194
< p > Description:</ p >
201
195
< div class ="youplay-textarea ">
202
196
< textarea
203
- [(ngModel)] ="description "
197
+ [(ngModel)] ="game. description "
204
198
rows ="5 "
205
- placeholder =this.game.description
206
- required
199
+ value ="game.description "
207
200
> </ textarea >
208
201
</ div >
209
- < div class ="wrong " [class.display-div] ="checkEmpty(description) ">
202
+ < div class ="wrong " [class.display-div] ="checkEmpty(game. description) ">
210
203
< p > The Description cant be empty! </ p >
211
204
</ div >
212
205
<!-- /Billing Information -->
@@ -215,7 +208,7 @@ <h2 class="mt-0">Game Details</h2>
215
208
</ div >
216
209
<!-- Order Button -->
217
210
< div class ="align-right ">
218
- < a class ="btn btn-default db " (click) ="edit($event) "> Create Game</ a >
211
+ < a class ="btn btn-default db " (click) ="edit($event) "> Edit Game</ a >
219
212
</ div >
220
213
<!-- /Order Button -->
221
214
</ div >
0 commit comments