2021-04-28 11:41:20 +00:00
|
|
|
import App from '../../../base'
|
|
|
|
import { react2angular } from 'react2angular'
|
|
|
|
import _ from 'lodash'
|
|
|
|
|
2021-05-21 11:32:51 +00:00
|
|
|
import { rootContext } from '../../../shared/context/root-context'
|
2021-05-21 11:32:42 +00:00
|
|
|
import BinaryFile from '../components/binary-file'
|
|
|
|
|
2021-04-28 11:41:20 +00:00
|
|
|
export default App.controller(
|
|
|
|
'ReactBinaryFileController',
|
|
|
|
function ($scope, $rootScope) {
|
|
|
|
$scope.file = $scope.openFile
|
|
|
|
|
|
|
|
$scope.storeReferencesKeys = newKeys => {
|
|
|
|
const oldKeys = $rootScope._references.keys
|
|
|
|
return ($rootScope._references.keys = _.union(oldKeys, newKeys))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
App.component(
|
|
|
|
'binaryFile',
|
2021-05-21 11:32:51 +00:00
|
|
|
react2angular(rootContext.use(BinaryFile), ['storeReferencesKeys', 'file'])
|
2021-04-28 11:41:20 +00:00
|
|
|
)
|