You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
840 B

  1. 'use strict';
  2. angular.module('app.dateAnalysis', ['ngRoute', 'chart.js'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/dateAnalysis', {
  5. templateUrl: 'views/dateAnalysis/dateAnalysis.html',
  6. controller: 'DateAnalysisCtrl'
  7. });
  8. }])
  9. .controller('DateAnalysisCtrl', function($scope, $http, $routeParams) {
  10. $scope.data=[];
  11. $scope.labels=[];
  12. $http.get(urlapi + 'houranalysis')
  13. .then(function(data, status, headers, config) {
  14. console.log('data success');
  15. console.log(data);
  16. $scope.data = data.data.data;
  17. $scope.labels=data.data.labels;
  18. }, function(data, status, headers, config) {
  19. console.log('data error');
  20. });
  21. });