NLeSC/Cesium-NcWMS

View on GitHub
app/scripts/customgraph/customgraph.directive.js

Summary

Maintainability
A
0 mins
Test Coverage
(function() {
  'use strict';

  function customgraphDirective() {
    return {
      restrict: 'EA',
      scope: {
        activated: '=',
        data: '=',
        onClick: '&'  // parent execution binding
      },
      templateUrl: 'scripts/customgraph/customgraph.directive.html',
      controller: 'CustomGraphController',
      controllerAs: 'customgraph',

      link: function(scope, element, attrs) {
        scope.customgraph.init(element[0], attrs);
      }
    };
  }

  angular.module('eWaterCycleApp.customgraph').directive('customgraphDirective', customgraphDirective);
})();