Questions tagged [single-page-application]

A single-page application (SPA) is a web application that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

A single-page application (SPA), also known as single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

In an SPA, either all necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load, or partial changes are performed loading new code on demand from the web server, usually driven by user actions. The page does not automatically reload during user interaction with the application, nor does control transfer to another page. Updates to the displayed page may or may not involve interaction with a server.

Resources

5306 questions
15
votes
2 answers

Login page in AngularJS

I've got a web application where all interactions require logging in. I see at least two ways of implementing a login page view in AngularJS. One is to use a separate view: let say I'm using angular-ui-router and define a top-level view with two…
liori
  • 40,917
  • 13
  • 78
  • 105
15
votes
2 answers

Partial Entity Updates in WebAPI PUT/POST

Say you have a repository method to update a Document: public Document UpdateDocument(Document document) { Document serverDocument = _db.Documents.Find(document.Id); serverDocument.Title = document.Title; serverDocument.Content =…
14
votes
2 answers

Is it best to use Next.js along with ASP.NET Core web api if SSR is not the target?

I am looking into React framework Next.js to see if it is best match as SPA for my next application where ASP.NET Core will be backend. I have used create-react-app in the past so wanted to compare Next.js with it. Our aim is not Server Side…
14
votes
2 answers

How can I host ASP.NET API and Blazor Web Assembly like an JavaScript-SPA?

Context: We want to create a Single Page Application that runs with Blazor WebAssembly on the client-side. On the server-side, the solution has an ASP.NET MVC which includes some ApiController classes for our REST APIs. We want to use ASP.NET API…
14
votes
6 answers

How to hide the Intercom chat widget in specific pages in a single page application (SPA)?

Consider a single page application written in vanilla JS (to avoid framework-specific answers). I have an app in which I load Intercom by default, but I want to hide the widget in specific pages. That should be doable from Intercom itself, as shown…
Gilberto Torrezan
  • 5,113
  • 4
  • 31
  • 50
14
votes
3 answers

Converting an Image url to base64 in Angular

I am struggling trying to convert a given image url to base64... in my case i have a String with the image's path var imgUrl = `./assets/logoEmpresas/${empresa.logoUrl}` how can i convert the given image url in a base64 directly?... i tried this…
14
votes
2 answers

Single Page Application Routing

Modern single page applications use routing mechanisms which don't have to rely on fragments or additional url parameters, but simply leverage the url path. How does the browser know when to ask the server for a resource and when to ask the single…
paweloque
  • 18,466
  • 26
  • 80
  • 136
14
votes
3 answers

Laravel - Passport/SPA 401 Unauthorized

I've registered the Vue components as mentioned in the Laravel Passport documentation, and they also do show up in my…
oliverbj
  • 5,771
  • 27
  • 83
  • 178
14
votes
1 answer

nginx config with spa and subdirectory root

I always seem to have problems with nginx configurations. My SPA is located at /mnt/q/app (pushstate is enabled) and the frontend root is located at client/public. Everything should be mapped to index.html, where the app picks up the route and…
marekpw
  • 662
  • 2
  • 5
  • 19
14
votes
1 answer

Nginx config for single page app with HTML5 App Cache

I'm trying to build a single page app that utilizes HTML5 App Cache, which will cache a whole new version of the app for every distinct URL, thus I must redirect everyone to / and have my app route them afterward (this is the solution used on…
winduptoy
  • 5,366
  • 11
  • 49
  • 67
14
votes
3 answers

How to implement deep linking client on top of HATEOAS server?

There's a similar question on SO, but it's not phrased well and it lacks details. So I'm trying to write a better question. I'm interested in how to implement HATEOAS with a single page application (SPA) that is using pushState. I want to preserve…
Mark E. Haase
  • 25,965
  • 11
  • 66
  • 72
14
votes
3 answers

Understanding the VS2013 MVC 5 SPA template

I've started playing with the Single Page Application template for MVC 5 that comes with Visual Studio 2013. I'm more than familiar with Knockout.js, and although I wasn't with Sammy.js I've been reading up on it and it doesn't seem all that…
14
votes
2 answers

AngularJS UI-Router multiple pages

As Angular is SPA that's terrific, but what if I need some other page not related to index.html, how is realised by UI-Router states with different ui-views? For example, I have index.html:
14
votes
3 answers

Tell screen reader that page has changed in Backbone/Angular single-page app

Imagine you have a simple, single-page application - regardless of whether it was written using Backbone, Angular, Ember or anything else. How can you tell a screen reader that we've changed 'page' when a route is followed? In a classic application,…
14
votes
3 answers

How to handle localization in knockout.js?

How do you handle localization using knockout.js? It seems like knockback.js has a nice looking utilities to handle localization, and I'm wondering if there are any third party libraries which can be used with knockout.js to handle localization…
Bob Smith
  • 791
  • 2
  • 9
  • 19