This file contains 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
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> |
This file contains 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
//Variables globales en Javascript | |
var myVar; //undefined | |
var rootFolder = "//static/app/.."; //String | |
var numberOfQuots = 5; //int | |
var arr = []; //array | |
//with instance | |
var obj = new Object(); //instance new object |
This file contains 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
//simple function | |
function doSomething(){ | |
//do something | |
... | |
} | |
//function with arguments | |
function doSomethingWithArgs( arg1, arg2 ){ | |
//args could be undefined or defined type | |
... |
This file contains 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
//defined function | |
function doSomething(msg){ | |
alert(msg); | |
} | |
//attach event for h1 elements | |
document.querySelector('h1').onclick = function () { | |
doSomething('h1: Event OnClick attached'); | |
}; |
This file contains 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
<div ng-app="App"> | |
<div ng-controller="MainCtrl as vm"> | |
<input type="text" ng-model="vm.customModel"/> | |
<div> | |
<span>Two way data-binding rocks: {{ vm.customModel }}</span> | |
</div> | |
</div> | |
</div> |
This file contains 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
angular | |
.module('App', []) | |
.controller('MainCtrl', function () { | |
var vm = this; | |
vm.customModel = 'Era gol de yepes'; | |
}); |
This file contains 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
//entity country | |
var Country = function ( id, name, president ) { | |
this.id = id; | |
this.name = name; | |
this.president = president; | |
}; |
This file contains 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
// vim:ts=4:sts=4:sw=4: | |
/*! | |
* | |
* Copyright 2009-2012 Kris Kowal under the terms of the MIT | |
* license found at http://github.com/kriskowal/q/raw/master/LICENSE | |
* | |
* With parts by Tyler Close | |
* Copyright 2007-2009 Tyler Close under the terms of the MIT X license found | |
* at http://www.opensource.org/licenses/mit-license.html | |
* Forked at ref_send.js version: 2009-05-11 |
This file contains 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 EntitiesAPI = (function () { | |
//TODO | |
... | |
}()); |
This file contains 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
//Module | |
var EntitiesAPI = (function () { | |
//configurations | |
var defineProperties = function (obj, key, value) { | |
var config = { | |
value: value, | |
writable: true, | |
enumerable: true | |
}; | |
Object.defineProperty(obj, key, config); |
OlderNewer