Mar 29 2017 01:32 AM
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 --global --save". When i tried to build the project with gulp serve command it give me 43 error all are in sharepoint dt.The error is "Error - typescript - typings\globals\sharepoint\index.d.ts(11190,40): error TS2304: Cannot find name 'Sys'." It seems some depency is not installed but i could not able to figure out which one. Please share your knowledge with me to fix this problem.
i want to use the sharepoint global variable _spPageContextInfo in typescript fir this reason i need sharepoint typescript reference that i get by "typings install dt~sharepoint --global --save". when try to build the project with gulf server it gives me avove error.
Mar 29 2017 08:21 AM
Mar 29 2017 08:31 AM
Mar 29 2017 12:27 PM
This looks like an issue with the typings being out of sync. As a first step I suggest that you make sure you have the latest generator installed and create a new project and see if that builds properly. The scaffolded project will include TypeScript.
Angular 2 (aka Angular) is not yet fully supported in SPFx, but there is a prototype sample at https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/angular2-prototype.