title: Change the font of HTML5 Canvas using a button in Angular.js
body: <p>I want to change the font of my HTML canvas using a button.When I will click in this button, a function in my angularjs file will trigger and the font will be changed.But nothing actually happening here.The font is not changing at all.I can change the background color but not the font.</p>
  
  <p>Code of HTML part</p>
  
  <pre><code>&lt;button type="button" id="btn" ng-click="changefont()"&gt;Font&lt;/button&gt;
       &lt;div&gt;
          &lt;canvas ng-style="mybody" id="myCanvas"  style="border:1px solid #d3d3d3;"&gt;
          Your browser does not support the HTML5 canvas tag.&lt;/canvas&gt;
       &lt;/div&gt;
  </code></pre>
  
  <p>Code of Angular.js part</p>
  
  <pre><code>           $scope.changefont=function(){
                  $scope.mybody = {
  
                      "font" : " 15px sans-serif",
                      "background-color" : $scope.bcname
  
                  }
                  console.log("fontclick");
              }
  </code></pre>
  
  <p>in another function I have code for canvas</p>
  
  <pre><code>var c = document.getElementById("myCanvas");
  var ctx = c.getContext("2d");
  ctx.fillText(strings, 100, 100*(i+1));
  </code></pre>