How to use the superdesk-core/scripts/core/services/ng.waitForServicesToBeAvailable function in superdesk-core

To help you get started, we’ve selected a few superdesk-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github superdesk / superdesk-planning / client / index.js View on Github external
($injector, sdPlanningStore, extensionPoints, functionPoints, assignments, deployConfig) => {
            ng.register($injector);

            const callback = (extension, scope) => (
                sdPlanningStore.initWorkspace(WORKSPACE.AUTHORING, (store) => {
                    store.dispatch(actions.fetchAgendas());
                    extension.props.store = store;
                    scope.$watch('selected.preview', (newValue) => {
                        extension.props.store.dispatch(actions.main.onQueueItemChange(newValue));
                    });
                })
            );

            ng.waitForServicesToBeAvailable()
                .then(() => {
                    extensionPoints.register('publish_queue:preview',
                        PublishQueuePanel, {}, ['selected'],
                        callback);
                });

            deployConfig.promise.then(() => {
                if (get(deployConfig, 'config.planning_check_for_assignment_on_publish', false)) {
                    functionPoints.register(
                        'authoring:publish',
                        assignments.onPublishFromAuthoring
                    );
                }
            });
        },
    ]);

superdesk-core

![CI](https://github.com/superdesk/superdesk-client-core/workflows/CI/badge.svg) [![Code Climate](https://codeclimate.com/github/superdesk/superdesk-client-core/badges/gpa.svg)](https://codeclimate.com/github/superdesk/superdesk-client-core)

AGPL-3.0
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Similar packages