mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 18:42:57 -05:00
764234e42b
Rename `binary-file` components to `file-view` GitOrigin-RevId: b960d4e6f154ee1a5847782a1fcb1e4e61159603
23 lines
628 B
JavaScript
23 lines
628 B
JavaScript
import App from '../../../base'
|
|
import { react2angular } from 'react2angular'
|
|
import _ from 'lodash'
|
|
|
|
import { rootContext } from '../../../shared/context/root-context'
|
|
import FileView from '../components/file-view'
|
|
|
|
export default App.controller(
|
|
'FileViewController',
|
|
function ($scope, $rootScope) {
|
|
$scope.file = $scope.openFile
|
|
|
|
$scope.storeReferencesKeys = newKeys => {
|
|
const oldKeys = $rootScope._references.keys
|
|
return ($rootScope._references.keys = _.union(oldKeys, newKeys))
|
|
}
|
|
}
|
|
)
|
|
|
|
App.component(
|
|
'fileView',
|
|
react2angular(rootContext.use(FileView), ['storeReferencesKeys', 'file'])
|
|
)
|