This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="foo-component"> | |
<template> | |
<h3>Frutas</h3> | |
<template id="templateFruits" is="dom-repeat" filter="filterFruits" items="{{fruits}}" sort="orderFruits"> | |
<template is="dom-if" if="{{item.color}}"> | |
<p>La fruta {{index}} es {{item.name}} | |
y es de color {{item.color}} <br> | |
<button on-tap="setFavorite">favorita</button></p> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="fruit-component"> | |
<template> | |
<p>color: {{color}}</p> | |
<button on-tap="setColor">set color in light dom</button> | |
</template> | |
<script> | |
Polymer({ | |
is: 'fruit-component', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="foo-component"> | |
<template> | |
<style> | |
</style> | |
<button on-tap="addFruit">Añadir fruta</button> | |
La primera fruta es: {{getFruit(fruits.*, 0)}} | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var checkForm = { | |
checkInputs: function(user, pass) { | |
var isValid = true; | |
if ( !user || !pass || user.indexOf('@') === -1 ) { | |
isValid = false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="description" content="taller: presentación polymer"> | |
<meta name="author" content="mmfilesi"> | |
<meta name="Copyright" content="cc-by-sa"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui, shrink-to-fit=no"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* 1. Closures */ | |
(function () { | |
var privateVar = "foo"; | |
})(); | |
console.log(privateVar); // Uncaught ReferenceError: privateVar is not defined | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> |
NewerOlder