title: whem i am trying to call JavaScript method in html if methods parameter is null my result is method's caller scripts
body: <p>i have html code to get and print string from JS method   </p>
  
  <pre><code> &lt;div class="commentDiv"&gt;{{ commentSubString(item.commentList[0].content) }} &lt;/div&gt;
  </code></pre>
  
  <p>here is my JS method </p>
  
  <pre><code>$scope.commentSubString = function(fullComment)
      {
          var subString;
          if(fullComment.length&lt;16 &amp;&amp; ullComment.length&gt;0)
              {
                  subString=fullComment;
              }
          if(fullComment.length&lt;=0 || !fullComment)
          {
              subString="";
          }
          if(fullComment.length&gt;=16)
          {
              subString = fullComment.substring(0,15);
          }
          return subString;
      }
  </code></pre>
  
  <p>if methods argument is not null the result is correct, but if it is not initialized the result is  methods caller script </p>
  
  <pre><code>{{ commentSubString(item.commentList[0].content) }}
  </code></pre>
  
  <p>like in this picture </p>
  
  <p><a href="https://i.stack.imgur.com/t4oOW.png" rel="nofollow noreferrer">enter image description here</a></p>