Replaced jQuery code with AngularJS code.