simple type test written with AngularJS