Skip to content

Instantly share code, notes, and snippets.

View ronaiza-cardoso's full-sized avatar
🏳️‍🌈

Ronaíza Cardoso ronaiza-cardoso

🏳️‍🌈
View GitHub Profile
@ronaiza-cardoso
ronaiza-cardoso / data.json
Last active April 11, 2017 17:05
AutoComplete
(index):23 [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object…][0 … 99]0: ObjectBAIRRO: "ALTINÓPOLIS"CEP: "35053790"CIDADE: "GOVERNADOR VALADARES"CODCID: "3169"ENDERECO: "RUA ABEL COUTO"ESTADO: "MINAS GERAIS"SIGLA: "MG"__proto__: Object1: Object2: Object3: Object4: Object5:
import {Directive, Attribute} from '@angular/core';
import {NgModel} from '@angular/common';
@Directive({
selector: '[mask]',
host: {
'(keyup)': 'onInputChange()'
}
})
export class Mask {
maskPattern: string;
const userData = {name: 'lubien'}
localStorage.setItem('user', JSON.stringify(userData))
const persisted = JSON.parse(localStorage.getItem('user'))
console.log(persisted)
@ronaiza-cardoso
ronaiza-cardoso / forcelowercase.js
Created January 3, 2017 12:00 — forked from dkarter/forcelowercase.js
Angular directive to force lowercase letters on an input textbox as you type
'use strict';
/**
* @ngdoc directive
* @name myapp.directive:forceLowerCase
* @description
* # forceLowerCase
*/
angular.module('myapp')
.directive('forceLowerCase', function ($parse) {