score:2

Accepted answer

every angularjs app have to be mounted in the document using those directives: ng-app ng-controller
your fiddle fixed: https://jsfiddle.net/nmwypgdq/9/

<div ng-app="app" ng-controller="barctrl">
  <canvas id="bar" class="chart chart-bar" chart-data="data" chart-labels="labels" chart-series="series"></canvas>
</div>

$scope object passed by controller callback is available in your template. you can reference its properties and methods in the template. thus chart-data="data" binds html element property chart-data with $scope.data defined in the controller callback. chart-labels is bound with $scope.labels and so on...


Related Query

More Query from same tag