root-context-controller.js 451 B

123456789101112131415
  1. import App from '../../../base'
  2. import { react2angular } from 'react2angular'
  3. import { rootContext } from '../root-context'
  4. App.controller('ReactRootContextController', function($scope, ide) {
  5. $scope.editorLoading = !!ide.$scope.state.loading
  6. ide.$scope.$watch('state.loading', editorLoading => {
  7. $scope.editorLoading = editorLoading
  8. })
  9. })
  10. App.component(
  11. 'sharedContextReact',
  12. react2angular(rootContext.component, ['editorLoading'])
  13. )