Skip to content

Instantly share code, notes, and snippets.

View rowdyrabouw's full-sized avatar

Rowdy Rabouw rowdyrabouw

View GitHub Profile
@rowdyrabouw
rowdyrabouw / gist:479ca434db0c3bf59e663f61314b9213
Created May 26, 2017 17:59
Custom Angular pipe for formatting IBAN
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'iban' })
export class Iban implements PipeTransform {
transform(value: string): string {
// remove existing spaces
let lIban: string = value.replace(" ", "");
// place a space after every 4th character
lIban = lIban.replace(/(.{4})/g, "$1 ");
console.log(lIban);
<StackLayout>
<Label [text]="appVersion"></Label>
</StackLayout>
@rowdyrabouw
rowdyrabouw / dataform.ts
Created September 30, 2016 12:00
RadDataForm NativeScript
import dataFormModule = require("nativescript-telerik-ui-pro/dataform");
import viewModel = require("./person-model");
export function onPageLoaded(args) {
var page = args.object;
page.bindingContext = new viewModel.PersonViewModel();
}