Skip to content

Instantly share code, notes, and snippets.

View fabiogoll's full-sized avatar

Fábio Goll fabiogoll

View GitHub Profile
@fabiogoll
fabiogoll / bo.ts
Last active December 1, 2018 01:31
[Angular2] Implementação da Paginação no projeto
import {Paginacao, PaginacaoRequest} from "../utils/paginacao";
buscarClientePorFilial(filialId: number, pr: PaginacaoRequest): Promise<Paginacao> {
var self = this;
return new Promise<Paginacao>((resolve, reject) => {
var resposta: Resposta = new Resposta(TipoErro.ERROR, "Erro na busca de clientes!");
if (filialId === 0) {
resposta.motivo.push("Código da filial não pode ser nula!");
reject(resposta);
@fabiogoll
fabiogoll / Project.md
Last active October 10, 2016 19:07
Service agnostico

Project

  • shared
  • web
  • mobile
@fabiogoll
fabiogoll / gist:ff02783e44d3235cc7a66c040281c497
Last active November 30, 2016 18:20
Forçar download via ajax com saveblob ou link de acordo com o navegador
var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
var saveBlob = navigator.saveBlob || navigator.webkitSaveBlob || navigator.mozSaveBlob;
var downloadComSaveBlob = function (blob, nome) {
try {
$log.info('-- Tentando realizar o download com o método saveBlob --');
if (navigator.msSaveBlob) {
@fabiogoll
fabiogoll / API Mocky.io
Last active May 21, 2019 00:04
API Zero2One Turma 2
# API Mocky.io
### tips.header
tips.jsonp.title = tips.jsonp.body
tips.delay.title = tips.delay.body
tips.cors.title = tips.cors.body
*API Lista de tarefas*
http://www.mocky.io/v2/5ce336d9340000af527738ee
Response
[