Error: view.hlp(...) is not a function in jsrender
<p>I am using jsrender to map the templates in grid. I am calling a method inside jsrender if condition like below,</p>

<pre><code>@section scripts{
    $.views.helpers({
        isMobile: function () {
            return ("@IsMobileDevice" == "False" &amp;&amp; (window.innerWidth &lt; 1200));
        }
    });
}
</code></pre>

<pre class="lang-html prettyprint-override"><code>&lt;script type="text/x-jsrender"&gt;
    {{if ~isMobile()}}
        &lt;li class="show"&gt;Show&lt;/li&gt;
    {{/if}}
&lt;/script&gt;
</code></pre>

<p>But I am getting an error: </p>

<blockquote>
  <p>view.hlp(...) is not a function. </p>
</blockquote>

<p>Whats wrong here ?</p>