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
#teste |
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 id = 0; | |
$scope.adicionalinha = function(){ | |
$http.get('/inicio/'+$routeParams.id).success( | |
function(memorando){ | |
console.log("memorando tamanho "+memorando.tabela.length); | |
id += memorando.tabela.length; | |
}, | |
function(erro){ |
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
//código do model | |
var mongoose = require('mongoose'); | |
module.exports = function(){ | |
var schema = mongoose.Schema({ | |
numeroincidente: { | |
type: String, |
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 http = require('http'); | |
var url = require('url'); | |
var querystring = require('querystring'); | |
var contatos = [ | |
{nome: "Bruno", telefone: "9999-2222", data: new Date(), operadora: {nome: "Oi", codigo: 14, categoria: "Celular"}}, | |
{nome: "Sandra", telefone: "9999-3333", data: new Date(), operadora: {nome: "Vivo", codigo: 15, categoria: "Celular"}}, | |
{nome: "Mariana", telefone: "9999-9999", data: new Date(), operadora: {nome: "Tim", codigo: 41, categoria: "Celular"}} | |
]; | |
var operadoras = [ |
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
cd ~ | |
##If you want to install OpenJDK | |
#sudo apt-get update | |
#sudo apt-get install openjdk-8-jre-headless -y | |
###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer |
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
SCHEMA MONGOO: | |
var mongoose = require('mongoose'); | |
module.exports = function () { | |
var schema = mongoose.Schema({ | |
origin: { | |
type: String, |
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
<template> | |
<div class="col-md-6 col-md-offset-3"> | |
<h4>Cadastre um lugar que você já foi e deixe um comentário</h4> | |
<div class="alert alert-danger" v-if="error"> | |
<p>{{ error }}</p> | |
</div> | |
<form class="" @submit.prevent="salva()"> | |
<div class="form-group"> | |
<input type="text" class="form-control" placeholder="Entre com o titulo" v-model="lugares.titulo"> | |
</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
mains.js | |
import Vue from 'vue' | |
//Subcomponentes de Create.vue | |
import Item from './components/create/Timelineitem.vue' | |
Vue.component('item', { | |
template: Item | |
}) |
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
Esse é o arquivo store.js | |
import Vue from 'vue' | |
import Vuex from 'vuex' | |
//Indica para o Vue utilizar o vuex | |
Vue.use(Vuex) | |
//cria variaveis de estado para todos os componentes filhos terem acesso | |
const state = { | |
info: [] |
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
<script> | |
import { incrementInfo } from '../../vuex/actions' | |
console.log(incrementInfo) | |
export default { | |
props: { | |
item: Object | |
}, | |
vuex: { | |
actions: { | |
incrementInfo |
OlderNewer