Codes for AngularJS