Add AngularJS functions