iknb/components/print/print.component.js
2020-07-08 13:56:33 +02:00

30 lines
989 B
JavaScript

'use strict';
angular
.module('sloDialectsApp')
.component('print', {
templateUrl: 'components/print/print.template.html',
controller: ['$scope', '$rootScope', function printController($scope, $rootScope) {
var vm = this;
$scope.$watch(
function() { return ($rootScope.printData && $rootScope.printData.dialectData) ? $rootScope.printData.dialectData : '' },
function(dialectData) {
if(dialectData){
vm.dialectData = dialectData;
}
}
);
$scope.$watch(
function() { return ($rootScope.printData && $rootScope.printData.analysisData) ? $rootScope.printData.analysisData : '' },
function(analysisData) {
if(analysisData){
vm.analysisData = analysisData;
}
}
);
}]
});