Forum Discussion
Samaresh Das
Mar 29, 2017Copper Contributor
sharepoint type script in SPFX
Hi All, I am working in SPFX with angular 2. I wanted to use sharepoint type script in my project. I have installed the sharepoint type script with npm command "typings install dt~sharepoint --glob...
Luis Mañez
Mar 29, 2017MVP
couple of comments:
- in order to install typings, you should use npm instead of Typings:
npm install @types/sharepoint --save-dev
- Sys is not a sharepoint type. I think it comes from Microsoft AJAX.
- not sure if a spfx webpart can access the _spPageContextInfo variable (I remember @PatrickRodgers had some issues with the PnP JS library because the spPageContextInfo variable was not available on the spfx).
- why do you need that spPageContextInfo variable? I'm asking cos you have some "context" info in the spfx webpart:
this.context.pageContext
- in order to install typings, you should use npm instead of Typings:
npm install @types/sharepoint --save-dev
- Sys is not a sharepoint type. I think it comes from Microsoft AJAX.
- not sure if a spfx webpart can access the _spPageContextInfo variable (I remember @PatrickRodgers had some issues with the PnP JS library because the spPageContextInfo variable was not available on the spfx).
- why do you need that spPageContextInfo variable? I'm asking cos you have some "context" info in the spfx webpart:
this.context.pageContext