Skip to content

Instantly share code, notes, and snippets.

View chicojunior's full-sized avatar
:octocat:

Francisco do Vale chicojunior

:octocat:
View GitHub Profile
@chicojunior
chicojunior / Pratice2.js
Created September 17, 2011 18:43
Curso_Javascript_Fundamental
var objeto = {
nome: "Júnior Santos", telefone: "4567545676"
};
var template = "<div>#{nome} \ - #{telefone} - #{ (idade >=18)? \"permitido": \"proibido\"},<div>";
function Engine(tmpl){
var pattern = /\#\{([^}]+)\}/g;
function setAreaPictures(data) {
for (var i = 0; i < data.length; i++) {
if (data[i].business_area == "Beleza") {
$scope.areas[i].areaPicture = "img/area_icons/woman.svg";
} else if (data[i].business_area == "Comércio") {
$scope.areas[i].areaPicture = "img/area_icons/commerce.svg"
} else if (data[i].business_area == "Educação física") {
$scope.areas[i].areaPicture = "img/area_icons/football.svg"
} else if (data[i].business_area == "Música") {
$scope.areas[i].areaPicture = "img/area_icons/speaker.svg"