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 app = angular.module('AppExemplo', []) | |
app.service('InfoUsuario', function () { | |
var dados = { | |
nome: 'Leonardo Flores', | |
idade: 20, | |
} | |
return { | |
getDados: function () { | |
return dados; |
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
.config(function($ionicConfigProvider) { | |
$ionicConfigProvider.backButton.text('Go Back').icon('ion-chevron-left'); | |
$ionicConfigProvider.navBar.alignTitle("center"); | |
$ionicConfigProvider.tabs.position("bottom"); | |
$ionicConfigProvider.tabs.style("standard"); | |
}) |
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
.platform-android .bar-subheader.has-tabs-top{ | |
top:93px !important; | |
} | |
.platform-android .has-subheader.has-tabs-top{ | |
top:137px; | |
} |
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 app = angular.module('AppExemplo', []) | |
app.controller('ExemploController', function($scope, $http) { | |
var data = $.param({ | |
nome: $scope.nome, | |
idade: $scope.idade, | |
}); | |
$scope.cadastrarUsuario = function(){ | |
$http.post("http://sitedoallif/api/usuarios/", data).success(function(data, status) { |
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
//Coloca isso no teu arquivo PHP | |
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: GET, POST'); | |
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Access-Control-Allow-Origin"); // NOVA LINHA | |
$request = json_decode(file_get_contents('php://input')); | |
echo $request->nome | |
// MANIPULE O RESULTADO COMO QUEIRA! VIA O $request | |
?> |
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
window.resolveLocalFileSystemURI(imageURI, function(fileEntry) { | |
console.log(fileEntry.nativeURL); | |
}); |
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
class Usuario(): | |
def __init__(self): # construtor/inicializador | |
self.login = "admin" | |
self.senha = 123 | |
def logar(self): # o self se refere ao escopo desta classe (poderei acessar o login e senha e os demais metodos desta classe) | |
l = raw_input("Digite o login: ") | |
if l == self.login : # self.login me refiro a variavel login desta classe. OBS: login != self.login | |
print "Login Correto!" |
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 app = angular.module('AppExemplo', []) | |
app.config(function($mdGestureProvider) { | |
$mdGestureProvider.skipClickHijack(); | |
}) |
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
usuario | |
{ | |
_id: ObjectId(...), | |
name: 'Leo', | |
pass: '34dsi90$21', | |
filmes: [ | |
{ filme: 'As Branquelas', genero: 'Comedia'}, | |
{ filme: 'O Pequenino', genero: 'Infantil' } | |
] | |
} |
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
.controller ('ListarPacienteCtrl', function($scope,$ionicListDelegate,$ionicFilterBar, Paciente){ | |
$scope.pacientes = Paciente.all() | |
$scope.listCanSwipe = true; | |
$scope.data = { | |
showDelete: false | |
}; | |
$scope.onpacienteDelete = function(paciente) { | |
console.log(paciente.nombre) |
OlderNewer