code update to v2.2 now using AngularJS