Machine Problem in AngularJS

Write a program that will ask the user to give a number, and then the program will compute the factorial value of the given number by the user.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is and

My mobile number here in the Philippines is 09173084360.

Program Listing

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 20, 2021  Tuesday   10:12 PM
  Place    : Bacolod City, Negros Occidental
  Websites : and
  Email    :
<html ng-app="mainApp">
	<title>Factorial a Number in AngularJS</title>
body {
	font-family: arial;
	font-size: 25px;
	font-weight: bold;
<script type="text/javascript" src="angular.min.js">

<script type="text/javascript">

// AngularJS Controller Declaration

var app = angular.module('mainApp', [])
  .controller('Factorial_Controller', function($scope) {
  .filter('factorial', function() {
    return    function factorial(n) {
      return n === 0 ? 1 : n * factorial(n - 1);



<div ng-app="app" ng-controller="Factorial_Controller">
	<table border="0" cellspacing=10>
	<tr>Factorial a Number in AngularJS</tr>
	<td>Enter a Number </td>
	<td><input type="number" ng-model="val_1" ng-init="val_1=0"/></td>
	<p>The factorial value of {{val_1}} is {{val_1 | factorial}}. </p>