title: Calling function of server from view (html page) using ajax, URL is not working
body: <p>I am working on an ionic2 application, here is my local PC details-</p>
  
  <pre><code>******************************************************
  Your system information:
  
  Cordova CLI: 6.4.0 
  Ionic Framework Version: 2.0.0-beta.10
  Ionic CLI Version: 2.1.8
  Ionic App Lib Version: 2.1.4
  ios-deploy version: Not installed
  ios-sim version: 5.0.8 
  OS: OS X Yosemite
  Node Version: v6.2.2
  Xcode version: Xcode 7.2 Build version 7C68
  
  ******************************************************
  </code></pre>
  
  <p>I wanted to call a function of server from a view (web page) using AJAX-</p>
  
  <p><strong>server-page.ts--</strong>   </p>
  
  <pre><code>public myFunction(param1, param2) {
       code goes here... ;
  }
  </code></pre>
  
  <p><strong>some-page.html</strong>  </p>
  
  <pre><code>    function onClickMe(param1, param2) {
        $.ajax({
          url: "/../../../../app/pages/server/server-page.ts",
          // url: "/../../../app/pages/server/server-page.ts",
          // url: "/../../app/pages/server/server-page.ts",
          // url: "/app/pages/server/server-page.ts",
          // url: "http://localhost:8100/app/pages/server/server-page.ts",
          type: "POST",
          //data: jQuery.param({ firstParam: param1, secondParam : param2}),
          data: 'some data to pass',
          contentType: " charset=utf-8",
          success: function (response) {
            alert(response.status);
          },
          error: function () {
            alert("error page not Found");
          }
        });
      }
  </code></pre>
  
  <p>I have used all commented urls too, I am not sure how to do that.<br>
  Whenever I am calling that function, I get error as-  </p>
  
  <pre><code>http://localhost:8100/app/pages/server/server-page.ts 404 (Not Found)  
  </code></pre>
  
  <p>Hours gone, I am stuck out, help me !!!  </p>
  
  <p>Thanks in advance !!!</p>