How to use the @microsoft/sp-page-context.PageContext.serviceKey function in @microsoft/sp-page-context

To help you get started, we’ve selected a few @microsoft/sp-page-context 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 SharePoint / sp-dev-fx-webparts / samples / react-organisationchart / src / webparts / organisationChart / services / UserProfileService.ts View on Github external
serviceScope.whenFinished(() => {
                this._spHttpClient = serviceScope.consume(SPHttpClient.serviceKey);
                this._pageContext = serviceScope.consume(PageContext.serviceKey);
                this._currentWebUrl = this._pageContext.web.absoluteUrl;
            });
        });

@microsoft/sp-page-context

Page context services for the SharePoint Framework

https://aka.ms/spfx/license
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis

Similar packages