AppML - Controller

AppML application allows to control the UI using the controller function. appml-controller tag provides the name of the javascript function which acts as a controller. AppML application may or may not have a controller.


<table appml-controller="studentController"></table>

AppML sends messages to controller function via an application object denoted by $appml. Based on the properties of $appml we can perform various types of operations on HTML content. Following are some of the important examples.

  • Initialize data

  • Update application data

  • Input/output handling

  • Data validation

  • Data summarization

  • Error handling

  • Application start/stop



<!DOCTYPE html>
<html lang="en-US">
      table {
         border-collapse: collapse;
         width: 100%;

      th, td {
         text-align: left;
         padding: 8px;

      tr:nth-child(even) {background-color: #f2f2f2;}
   <script src=""></script>
   <table appml-data="students" appml-controller="studentController">
      <tr appml-repeat="records">
      var students = {
      function studentController($appml) {
         if ($appml.message == "display") {
            if ($ == "studentName") {
               $appml.display.value = $appml.display.value.toUpperCase();


Deploy the application on Web Server and access the html page. Verify the output.

first application