-
Notifications
You must be signed in to change notification settings - Fork 760
/
amd.js
32 lines (29 loc) · 841 Bytes
/
amd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function () {
'use strict';
require.config({
paths: {
angular: '../node_modules/angular/angular.min',
chart: '../node_modules/chart.js/dist/Chart.min',
'angular-chart': '../angular-chart'
},
shim: {
angular: {
exports: 'angular'
},
'chart.js': {
deps: ['angular', 'chart']
}
}
});
define(['angular', 'angular-chart'], function (angular/*, angularChart*/) {
var app = angular.module('examples', ['chart.js']);
app.controller('RequireCtrl', ['$scope', function ($scope) {
$scope.labels = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
$scope.series = ['Series A', 'Series B'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
}]);
});
})();