2021-04-28 07:41:20 -04:00
|
|
|
import App from '../../../base'
|
|
|
|
import { react2angular } from 'react2angular'
|
|
|
|
import _ from 'lodash'
|
|
|
|
|
2021-05-21 07:32:51 -04:00
|
|
|
import { rootContext } from '../../../shared/context/root-context'
|
2021-06-10 07:26:04 -04:00
|
|
|
import FileView from '../components/file-view'
|
2021-05-21 07:32:42 -04:00
|
|
|
|
2023-10-13 05:13:49 -04:00
|
|
|
export default App.controller('FileViewController', [
|
|
|
|
'$scope',
|
|
|
|
'$rootScope',
|
2021-04-28 07:41:20 -04:00
|
|
|
function ($scope, $rootScope) {
|
|
|
|
$scope.file = $scope.openFile
|
|
|
|
|
|
|
|
$scope.storeReferencesKeys = newKeys => {
|
|
|
|
const oldKeys = $rootScope._references.keys
|
|
|
|
return ($rootScope._references.keys = _.union(oldKeys, newKeys))
|
|
|
|
}
|
2023-10-13 05:13:49 -04:00
|
|
|
},
|
|
|
|
])
|
2021-04-28 07:41:20 -04:00
|
|
|
|
|
|
|
App.component(
|
2021-06-10 07:26:04 -04:00
|
|
|
'fileView',
|
|
|
|
react2angular(rootContext.use(FileView), ['storeReferencesKeys', 'file'])
|
2021-04-28 07:41:20 -04:00
|
|
|
)
|