Here are some samples of code I have written in javascript using AngularJS