title: Javascript not getting called inside div of ionic template hml file
body: <p>In my ionic app from the controller I received a json string of comma separated values. I want to display the json string in a html in tabular format. The html is placed inside template directory. </p>
  
  <p>I am calling a java script function from the div of html to achieve this but the js function is not getting hit. The js is included in index.html. What I am doing wrong? </p>
  
  <p>Here is the sample:</p>
  
  <p>the template/shop.html file:</p>
  
  <pre><code>&lt;ion-tabs class="tabs-icon-top tabs-color-active-positive"&gt;
  &lt;!-- Dashboard Tab --&gt;
  &lt;ion-tab title="Status" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse-strong"&gt;
      &lt;ion-view view-title="Shop"&gt;
          &lt;ion-content&gt;
              &lt;ion-list&gt;
                  &lt;ion-item ng-repeat="shop in shopList"&gt;
  &lt;!--
                      &lt;div class="row"&gt;
                          &lt;div class="col col-50 text-center"&gt;
                              &lt;script type="text/javascript"&gt;
                                  **createTable({{shop.Method}})**
                              &lt;/script&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  --&gt;
                      &lt;div id="Method"&gt;&lt;/div&gt;
                              &lt;script&gt;
                                  console.log("Inside div");  **HERE IS THE CALL TO JS FUNCTION** 
                                  **createTable({{shop.Method}});**
                              &lt;/script&gt;
                  &lt;/ion-item&gt;
              &lt;/ion-list&gt;
          &lt;/ion-content&gt;
      &lt;/ion-view&gt;
  &lt;/ion-tab&gt;
  &lt;!-- Chats Tab --&gt;
  &lt;ion-tab title="Chats" icon-off="ion-ios-chatboxes-outline" icon-on="ion-ios-chatboxes"&gt;
      &lt;ion-view view-title="Shop"&gt;
          &lt;ion-content&gt;
              &lt;ion-list&gt;
                  &lt;ion-item ng-repeat="shop in shopList"&gt;
                      &lt;div class="row"&gt;
                          &lt;div class="col col-50 text-center"&gt;
                              {{shop.Offers}}
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/ion-item&gt;
               &lt;/ion-list&gt;
          &lt;/ion-content&gt;
      &lt;/ion-view&gt;
  &lt;/ion-tab&gt;
  </code></pre>
  
  <p></p>
  
  <p>And here is my smaple JS function placed in utility.js</p>
  
  <pre><code>//function createTable($scope, method){
  function createTable(Method){
  //    var tar=document.getElementById(Method);
  //    $scope.shopMethod = [];
        var table=document.createElement('TABLE');
        table.border='1';
        var tbdy=document.createElement('TBODY');
        table.appendChild(tbdy);          
        for (var j=0;j&lt;4;j++){
                         var tr=document.createElement('TR');
                         tbdy.appendChild(tr);
                         for (var k=0;k&lt;2;k++){
                          var td=document.createElement('TD');
                          td.width='100';
                          if(k==0) td.innerHTML="School" +(j+1);
                          else    td.innerHTML="Percent" +(j+1);                                            
                          tr.appendChild(td);
                         }
                }
       //tar.appendChild(table);
  
  //                            &lt;div class="row"&gt;
  //                            &lt;div class="col col-50 text-center"&gt;
  //                                {{shop.Method}}
  //                            &lt;/div&gt;
  //                        &lt;/div&gt;
  //                            &lt;/div&gt;
  // $scope.shopMethod.push(table);
       console.log(table);
  //document.getElementById(Method).innerHTML="Hello"
  }
  </code></pre>