-
Notifications
You must be signed in to change notification settings - Fork 752
Expand file tree
/
Copy pathamd.js
More file actions
34 lines (32 loc) · 881 Bytes
/
amd.js
File metadata and controls
34 lines (32 loc) · 881 Bytes
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
33
34
(function() {
'use strict';
require.config({
paths: {
'angular': '../node_modules/angular/angular.min',
'chart': '../node_modules/chart.js/dist/Chart.min',
'angular-chart': '../src/angular-chart',
},
shim: {
'angular': {
exports: 'angular',
},
'chart.js': {
deps: ['angular', 'chart'],
},
},
});
define(['angular', 'angular-chart'], function(angular/* , angularChart*/) {
const 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],
];
}]);
});
})();