Skip to content

Instantly share code, notes, and snippets.

View badpenguin's full-sized avatar
🏠
Working from home

Antonio Gallo badpenguin

🏠
Working from home
View GitHub Profile
@badpenguin
badpenguin / helpers.ts
Created January 31, 2017 14:51
Angular2/Ionic2 Helper
import {$log} from "./$log";
import {jsObjectPrettyPrint} from "./js-object-pretty-print";
/**
* try to avoid circular references
* @param obj
* @returns {string}
*/
export function jStringify(obj) {
@badpenguin
badpenguin / Ionic2 Preloader Example index.html
Last active February 25, 2017 20:49
Ionic2 Preloader Example
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Ionic App</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
/*
* simple replacement for angular1 $log service
* https://www.antoniogallo.it/
*/
declare var console: any;
export class $log {
static has_debug: boolean = true;
@badpenguin
badpenguin / ionItemAccordion-directive.js
Created September 23, 2016 09:38
Ionic 1 accordion expanding ion-list
/*
* This is my accordion for Ionic 1 please visit http://www.antoniogallo.it/
*/
angular.module('rootApp').directive('ionItemAccordion', function($log, $ionicScrollDelegate,$ionicPosition, $timeout) {
return {
restrict: 'E',
replace: true,
transclude: true,
require: '^ionList',