continuing AngularJS implementation