Skip to content

Instantly share code, notes, and snippets.

@zomdar
zomdar / example-AIP.json
Last active August 5, 2020 16:09
example json for AIP bills
{
"id": {
// id from mongo
"$oid": "1d123fjfad"
},
"billnumber": String,
"billdate": String,
"billtitle": String,
"congress": String,
"session": String,
@zomdar
zomdar / safe-html.pipe.ts
Created August 23, 2019 20:48
safeHtml pipe
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
@Pipe({
name: 'safeHtml'
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private _sanitizer:DomSanitizer) {}
@zomdar
zomdar / Angular_array_movement.js
Created June 16, 2017 03:20 — forked from jfornoff/Angular_array_movement.js
This is some common element moving functionalitywithin JS Arrays, packaged in a Angular.js factory
app.factory('ArrayService', function(){
return {
deleteElement: function(array, element) {
var index = array.indexOf(element);
if(index == -1){
return false;
}
array.splice(index, 1);