editor-navigation-toolbar-controller.js 602 B

123456789101112131415161718
  1. import App from '../../../base'
  2. import { react2angular } from 'react2angular'
  3. import EditorNavigationToolbarRoot from '../components/editor-navigation-toolbar-root'
  4. import { rootContext } from '../../../shared/context/root-context'
  5. App.controller('EditorNavigationToolbarController', function($scope, ide) {
  6. $scope.onShowLeftMenuClick = () =>
  7. ide.$scope.$applyAsync(() => {
  8. ide.$scope.ui.leftMenuShown = !ide.$scope.ui.leftMenuShown
  9. })
  10. })
  11. App.component(
  12. 'editorNavigationToolbarRoot',
  13. react2angular(rootContext.use(EditorNavigationToolbarRoot), [
  14. 'onShowLeftMenuClick'
  15. ])
  16. )