Machine Language

Write a program that uses the ng-bind directive that will accept a series of digits from the user and then the program will add all the digits of a number.  For example, 12345 is equivalent to 15 if we add all the digits of 12345.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following,, and

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel


Want to support my channel?

GCash Account

Jake Pomperada




Thank you very much for your support
Program Listing
<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : July 29, 2021 Thursday  9:59 PM
  Place    : Bacolod City, Negros Occidental
  Websites : and
  Email    :
  <title>Add Digits of a Number Using ng-bind in AngularJS</title>
body {
  font-family: arial;
  font-size: 25px;
  font-weight: bold;
<script type="text/javascript" src="angular.min.js">

       var app = angular.module("add_digits", []);
        app.controller('app', ['$scope', function ($app) {
         $app.process= function () {
          var num1 = $app.num;
          var sum=0,rem=0;
         rem = num1%10;
         sum = (sum+rem);
         num1 = Math.floor(num1/10);
          $app.result = "The add digits of " + $app.num + " is " + sum + ".";
<div ng-app="add_digits" ng-controller="app">
  <table border="0" cellspacing=10>
  <tr>Add Digits of a Number Using ng-bind in AngularJS</tr>
  <td>Enter a Number </td>
  <td><input type="number"  ng-model="num" ng-change="process()"></td>
    <span ng-bind="result"></span>