Skip to content

Instantly share code, notes, and snippets.

View brunoksato's full-sized avatar
Focusing

Bruno Sato brunoksato

Focusing
View GitHub Profile
Study1_Python
@brunoksato
brunoksato / gulpfile.js
Created August 5, 2014 13:54
sem browserfy
/**
* Created by Bruno Sato on 04/08/2014.
*/
var gulp = require('gulp'),
gutil = require('gulp-util'),
minifyhtml = require("gulp-minify-html"),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
minifycss = require('gulp-minify-css'),
@brunoksato
brunoksato / gulpfile.js
Created August 5, 2014 13:55
com browserfy
/**
* Created by Bruno on 01/08/2014.
*/
var gulp = require('gulp'),
gutil = require('gulp-util'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
browserify = require('browserify'),
concat = require('gulp-concat'),
@brunoksato
brunoksato / gist:ce9c995d831f39f10d0f
Created August 26, 2014 18:04
Grid Error colunas
'use strict';
angular.module('grid', [])
.run(templateRun)
.directive('grid', Grid);
function templateRun ($templateCache) {
$templateCache.put('grid2.html', '<table><thead><tr><th ng-repeat="(key,value) in option.columns" ng-click="sort(value.predicate)"><strong>{{value.text}}</strong><th><tr></thead><tbody><tr ng-repeat="data in option.data"><td ng-repeat="field in data">{{field}}</td></tr></tbody></table>');
}
@brunoksato
brunoksato / ionicLoading
Created November 19, 2014 23:44
Ionic Loading
angular.module('ionicApp', ['ionic'])
.controller('AppCtrl', function($scope, $timeout, $ionicLoading) {
// Setup the loader
$scope.loading = $ionicLoading.show({
content: '<i class="icon ion-loading-c"></i>',
animation: 'fade-in',
showBackdrop: false,
maxWidth: 50,
showDelay: 0

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
angular.module('teste', [])
.controller('OneCtrl', OneCtrl)
.controller('SecondCtrl', SecondCtrl)
.service('ServiceGlobal', ServiceGlobal);
function OneCtrl($scope, ServiceGlobal){
$scope.data = {id: 1, nome: 'ola mundo'};
ServiceGlobal.addData($scope.data, true);
}
function mapQuery($q) {
return {
require: ['esriFeatureLayer', '^esriMap', 'query'],
scope:{
url: "="
},
controller: function ($scope, $element, $attrs) {
var queryDeferred = $q.defer();
@brunoksato
brunoksato / gist:5e7f9b2916289d1649a4
Created June 5, 2015 04:21
Gps Enable Cordova Ionic
function GeolocationSync(){
var existLatLong = Application.getPosition();
if(existLatLong === null){
$ionicLoading.show({
templateUrl: 'templates/components/sync.html',
scope: $scope
});
@brunoksato
brunoksato / frontendDevlopmentBookmarks.md
Last active August 29, 2015 17:52 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.