-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
77 lines (74 loc) · 1.34 KB
/
index.js
File metadata and controls
77 lines (74 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
var app = new Vue({
el: '#app',
data: {
message: 'Hola Juan!',
}
});
var app2 = new Vue({
el: '#app-2',
data: {
message: 'Cargaste esta página ' + new Date(),
}
});
var app3 = new Vue({
el: '#app-3',
data: {
seen: true
}
});
var app4 = new Vue({
el: '#app-4',
data: {
todos: [{
text: 'Learn JavaScript'
}, {
text: 'Learn Vue'
}, {
text: 'Build something awesome'
}]
}
});
var app5 = new Vue({
el: '#app-5',
data: {
message: 'Esta es mi primera práctica con Vue.js.'
},
methods: {
reverseMessage: function() {
this.message = this.message.split('').reverse().join('')
}
}
});
var app6 = new Vue({
el: '#app-6',
data: {
title: 'Al estilo angular',
message: ''
}
});
Vue.component('todo-item', {
props: ['todo'],
template: '<li>{{ todo.text }}</li>',
});
var app7 = new Vue({
el: '#app-7',
data: {
groceryList: [{
id: 0,
text: 'Verduras'
}, {
id: 1,
text: 'Carne'
}, {
id: 2,
text: 'Vino tinto'
}]
}
});
function toggle() {
if (app3.seen) {
app3.seen = false;
} else {
app3.seen = true;
}
};