mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 10:40:53 -05:00
e959529828
[web] Explicitly name angular parameters GitOrigin-RevId: 91beae68989d6c8122132b531a4338b116d87424
21 lines
515 B
JavaScript
21 lines
515 B
JavaScript
import App from '../../base'
|
|
|
|
App.controller('EditorLoaderController', [
|
|
'$scope',
|
|
'localStorage',
|
|
function ($scope, localStorage) {
|
|
$scope.$watch('editor.showVisual', function (val) {
|
|
localStorage(
|
|
`editor.mode.${$scope.project_id}`,
|
|
val === true ? 'rich-text' : 'source'
|
|
)
|
|
})
|
|
|
|
$scope.$watch('editor.newSourceEditor', function (val) {
|
|
localStorage(
|
|
`editor.source_editor.${$scope.project_id}`,
|
|
val === true ? 'cm6' : 'ace'
|
|
)
|
|
})
|
|
},
|
|
])
|