Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Vue({
- el: "#app",
- data: {
- items: [
- "Sok",
- "Mleko",
- "Chleb",
- "Szampan"
- ]
- },
- methods: {
- addItem: function() {
- this.items.push( prompt("Podaj produkt") );
- },
- filterItems: function() {
- this.items = this.items.filter(function(item) {
- return item.charAt(0) === "S";
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement