title: passing angular variable to razor function call
body: <p>Somewhere in my angularjs controller, i have this variable:</p>
  
  <pre><code>$scope.variableForRazor = "Test Value For RAZOR!";
  </code></pre>
  
  <p>I want this variable to be passed as parameter when calling C# function via razor. Here's the simplified c# code:</p>
  
  <pre><code>public static string ShowMessage(string msg)
  {
      return msg;
  }
  </code></pre>
  
  <p>in razor:</p>
  
  <pre><code>@CSharpMethod.ShowMessage("{{variableForRazor}}")
  </code></pre>
  
  <p>the problem is that the value passed was <code>{{variableForRazor}}</code> itself. </p>
  
  <p>How can I modify it so when I set a breakpoint on <code>ShowMessage</code>, the value that will be pass is <code>Test Value For RAZOR!</code>.</p>
  
  <p>I tried also the following but does not work.</p>
  
  <pre><code>@CSharpMethod.ShowMessage("variableForRazor")
  @CSharpMethod.ShowMessage({{variableForRazor}}) // does not compile
  @CSharpMethod.ShowMessage(variableForRazor) // does not compile
  </code></pre>