Use component in scheduler route, inject accountId into.

This commit is contained in:
Alexis Lahouze
2017-07-23 00:12:44 +02:00
parent 3326dac51a
commit c4c10f9ab7
3 changed files with 24 additions and 9 deletions

View File

@ -33,6 +33,8 @@ var ngMessages = require('angular-messages'),
ngUiNotification = require('angular-ui-notification'),
ngStrap = require('angular-strap');
var schedulerTmpl = require('./scheduler.html');
import { ScheduleController } from './schedule.controller';
import { ScheduleService } from './schedule.service';
@ -49,6 +51,13 @@ export default angular.module('accountant.scheduler', [
.factory('scheduleService', downgradeInjectable(ScheduleService))
.controller('SchedulerController', ScheduleController)
.component('scheduleComponent', {
bindings: {
accountId: '<'
},
templateUrl: schedulerTmpl,
controller: ScheduleController,
controllerAs: 'schedulerCtrl'
})
.name;