Can you Create a Single Page Application with SPFx yet ?

I Want to Create a single Application that can handle (CRUD) several lists.

I would like to add something here to understand about SPA and SPFx and how they are related.

SPAs are build using some modern framework like angularJS, react, backbone, knock out etc...

SPFx is a page and model client side development framework for SharePoint applications. Here you are creating client side web parts where you can use above modern frameworks like angularjs, react, backbone knock out etc. This web part will then be used to add on SharePoint pages, it will be added as a web part where page would be already created and hosted on SharePoint site collection.

Technology used for building SharePoint Framework client-side web parts is similar to that used for building single page applications (SPA). In fact, when using Angular v1.x to build SharePoint Framework web parts, the approach is very close to building a SPA: you specify the template, define the application configuration, its components, controllers, services and views, and bootstrap it in the DOM.

Now we have to understand that Web Parts are not single page applications. Single page applications own the whole page. They are the only piece of code living at the given URL. Developers who build the SPA define which elements are on the page and how they communicate with each other. Web parts on the contrary, are added to the page by end-users and can coexist with a dozen other web parts. Developers building web parts cannot make any assumptions about what other elements will be present on the page.

So when you say you wanted to create SPA with SPFx, I don't think it is right term to use. What you can say is that I wanted to used Modern SPAs framework like angularjs, knockout js in webpart created using SPFx.

I think you can do similar like create multipage routes in single webpart using below link https://blog.mastykarz.nl/build-multi-page-sharepoint-framework-client-side-web-parts-angular/

P.S. content in answer is directly refered from above link.

Hope this helps..happy coding!!!

yes its possible.

I think there are lot of article available to create Signle Page Application with SPFX.

You can have look below article for refrence

https://www.c-sharpcorner.com/article/sharepoint-framework-crud-operations-using-angular-js/

  • Thanks i will try this out :-) – DoubleB Sep 25 at 9:06

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.