File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 34
34
"jquery" : " ^2.2.4" ,
35
35
"vue" : " ^1.0.26" ,
36
36
"vue-router" : " ^0.7.13" ,
37
- "vue-typescript" : " ^0.5.1 "
37
+ "vue-typescript" : " ^0.5.2 "
38
38
}
39
39
}
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ export class Navbar extends Vue {
19
19
@Prop
20
20
inverted :boolean = true ; //default value
21
21
22
+ @Prop
23
+ object :{ default :string } = { default : 'Default object property!' } ; //objects as default values don't need to be wrapped into functions
24
+
22
25
links :Link [ ] = [
23
26
new Link ( 'Home' , '/' ) ,
24
27
new Link ( 'About' , '/about' )
@@ -28,4 +31,8 @@ export class Navbar extends Vue {
28
31
pathChanged ( ) {
29
32
console . log ( 'Changed current path to: ' + this . $route . path ) ;
30
33
}
34
+
35
+ ready ( ) {
36
+ console . log ( this . object . default ) ;
37
+ }
31
38
}
You can’t perform that action at this time.
0 commit comments