mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 22:29:01 +02:00
Merge pull request #3960 from overleaf/cmg-binary-file
[BinaryFile] Reopening of Binary file React migration GitOrigin-RevId: 050e66e3321bd6579d44932b669fc0a31df06d18
This commit is contained in:
committed by
Copybot
parent
23c73b9bf1
commit
3dfcb95802
@@ -0,0 +1,21 @@
|
||||
import App from '../../../base'
|
||||
import { react2angular } from 'react2angular'
|
||||
import BinaryFile from '../components/binary-file'
|
||||
import _ from 'lodash'
|
||||
|
||||
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',
|
||||
react2angular(BinaryFile, ['storeReferencesKeys', 'file'])
|
||||
)
|
||||
Reference in New Issue
Block a user