Prime number multiplication table generator written in AngularJS