import { IModule } from 'angular';
import { BASE_PATH } from '../../core/constants';
import {
  WidgetCategoryProductsReferenceController
} from './widget.category.products.reference.controller';

/**
 * Holding all parts of the reference module
 */
export const WidgetCategoryProductsModuleReference: IModule = angular
  .module('WidgetCategoryProductsModuleReference', [])
  .controller(
    'WidgetCategoryProductsReferenceController',
    WidgetCategoryProductsReferenceController
  )
  .config(['$routeProvider',
    function ($routeProvider) {
      $routeProvider
        .when('/widgets/category', {
          template: require('./widget.category.products.reference.html'),
          controller: WidgetCategoryProductsReferenceController,
          controllerAs: 'ctrl'
        })
  }])
;
