Posts

Showing posts with the label SPFx

Error : File to import not found or unreadable: node_modules/office-ui-fabric-core/dist/sass/variables/Font.Variables.

Image
Your web part.module.scss has import statement i.e. @import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss'; By default this package has not been installed. So you have to install this package : npm install @microsoft/sp-office-ui-fabric-core –save Then your import statement will work.

SharePoint Framework client-side web part sample with Angular Elements

Image
Greeting Web Part This web part is created with Angular Element. It has one element “ issharepoint ” which takes true if user is running this web part in SharePoint environment. Basically it shows current User Name, Title, Picture Url from “sp.profiles.myProperties” & Web Title from web object. Here is the custom element created : <app-greeting-wp-web-part issharepoint= ${ true } ></app-greeting-wp-web-part> Just download code from GitHub and install dependencies. I am using PnP JS to get data from SharePoint. I don’t want to run npm install every time when I am making any changes. So I made a small change in the project by adding a new file called “copyfile.js”. This file copies the “bundle.js” file to SPFx @node_modules folder. So you have to make changes in the destination path in the file. Thanks to Stefan Bauer for @pnp/spfx  and  Andrew Connell for blog

SharePoint Framework Web Part Properties

Hi, I have created examples for SharePoint Framework Web Part Property Field examples. Here I have covered almost all the properties & functions for each field. You can download examples from Github : SPFxButton SPFxCheckbox SPFxChoiceGroup SPFxDropdown SPFxGroups SPFxHeaders SPFxHorizontalRule SPFxLabel SPFxLink SPFxMultiLineTextbox SPFxPages SPFxSlider SPFxTextbox

SharePoint Framework with the extension

Image
I tried to create SharePoint Framework with the extension provided by SharePoint PnP. It is very easy to create a SharePoint Framework Web Part in Visual Studio. Developer need to first fulfill the Pr-requisites Set up your Office 365 tenant Set up your development environment Install the extension in Visual Studio: Download the .vsix file from the repo Releases page or from the Visual Studio Extension Gallery Ensure Visual Studio is closed Double-click on the downloaded .vsix file Follow the installation prompts Restart Visual Studio when the installer has completed After installation of these pre-requisites , You will be ready to create new Web Part with SharePoint Framework. Here is simple steps to create a small web part: Open Visual Studio 2015 / 2017 & Create new project. Here you need to go to the SharePoint templates category and then select SPFx Web Part Project. You must provide sol