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 Human = function (name, age) { | |
return { | |
init: function () { | |
this.setName(name); | |
this.setAge(age); | |
}, | |
setName: function (name) { | |
this.setName = name; | |
}, |
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
/* | |
* AppBootstrap.js - This file contains the path to Backbone, Underscore, Jquery and | |
*also the variables that which one will export | |
*/ | |
/*global require*/ | |
'use strict'; | |
require.config({ | |
shim: { |
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 n = 10 | |
var C = function () { | |
this.s = function (a, b) { | |
return a + b | |
} | |
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 numero = 10; | |
var Calculadora = function () { | |
this.soma = function (numero1, numero2) { | |
return numero1 + numero2 | |
} |
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
//Os eventos 'pageinit' e 'pagecreate' são chamados | |
//quando exibimos uma página pela primeira vez... | |
//vamos criar um objeto chamado app | |
var app = {}; | |
$(document).bind('pageinit', function (ev) { | |
//toda vez que chamarmos esse novo evento | |
//checaremos se a propriedade 'loaded' | |
//existe e é verdadeira. Caso contrário instanciamos |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Title</title> | |
<link rel="stylesheet" href="lib/jquery.mobile-1.3.0/jquery.mobile-1.3.0.css" /> | |
<script type="text/javascript" src="lib/jquery-1.8.3.js"></script> | |
<script type="text/javascript" src="lib/jquery.mobile-1.3.0/jquery.mobile-1.3.0.min.js"></script> | |
<script type="text/javascript" src="js/transition-test.js"></script> | |
</head> |
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
//aqui temos o json com dados que devemos exibir para o usuário | |
var employeesListByCompany = [ | |
{ | |
name: 'Death Star', | |
employees: [ | |
{ | |
name: 'Darth Vader', | |
email: '[email protected]' | |
}, |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Teste COM Templates</title> | |
<style type="text/css"> | |
.employee-name { | |
list-style: none; | |
} | |
.employee-data { | |
list-style: none; |
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
//Aqui temos o json que poderíamos receber do back-end | |
//uma lista de empresas que tem uma lista de funcionários | |
//que tem nome e email | |
var employeesListByCompany = [ | |
{ | |
name: 'Death Star', | |
employees: [ | |
{ | |
name: 'Darth Vader', | |
email: '[email protected]' |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Teste SEM template</title> | |
<style type="text/css"> | |
.employees { | |
list-style: none; | |
} | |
.employee-data { | |
list-style: none; |