File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
days/093-096-vuejs/movie_exploder Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 3
3
app = new Vue ( {
4
4
el : '#app' ,
5
5
data : {
6
- search_text : "initial value" ,
6
+ search_text : null ,
7
7
movies : movies_temp . hits
8
+ } ,
9
+ methods : {
10
+ search : function ( ) {
11
+ let text = this . search_text
12
+ console . log ( "Would have searched for " + text )
13
+ } ,
14
+ top_10 : function ( ) {
15
+ console . log ( "Would have loaded top 10" )
16
+ }
8
17
}
9
18
} )
Original file line number Diff line number Diff line change 13
13
< div class ="card " id ="app ">
14
14
< h1 > Movie Exploder</ h1 >
15
15
16
- <!--suppress HtmlFormInputWithoutLabel -->
17
- < input type ="text " v-model ="search_text ">
16
+ < div class ="controls ">
17
+ <!--suppress HtmlFormInputWithoutLabel -->
18
+ < input type ="text " v-model ="search_text "
19
+ class ="form-control "
20
+ placeholder =" Search for a movie by keyword "
21
+ @keyup.enter ="search() "
22
+ >
23
+
24
+ < div class ="subcontrols ">
25
+ < a class ="top_10 " @click ="top_10() "> Top 10</ a >
26
+ </ div >
27
+
28
+ </ div >
18
29
19
30
< div class ="movies ">
20
31
< div class ="movie " v-for ="m in movies ">
You can’t perform that action at this time.
0 commit comments