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
36
votes
3 answers

How to ajax-refresh dynamic include content by navigation menu? (JSF SPA)

I'm just learning JSF 2 thanks to this site I had learned a lot in such a short time. My question is regarding how to implement a common layout to all my JSF 2 pages and have only the content part of the page refresh not the whole page whenever I…
royjavelosa
  • 2,048
  • 6
  • 30
  • 46
36
votes
6 answers

Apply loading spinner during ui-router resolve

resolve property of $routeProvider allows to execute some jobs BEFORE corresponding view is rendered. What if I want to display a spinner while those jobs are executed in order to increase user experience? Indeed, otherwise the user would feel the…
Mik378
  • 21,881
  • 15
  • 82
  • 180
35
votes
12 answers

visual studio not updating html / javascript to server / browser

This is an MVC 4 app using the Hot Towel SPA template. Whenever I change anything in the HTML and/or javascript the only way I can get the new code to display is to clear the browser cache. F5, cntrl-F5, shift-F5, nothing works. I'm not normally a…
Brian
  • 2,318
  • 3
  • 19
  • 20
34
votes
8 answers

Google Analytics: How to track pages in a single page application?

Currently in my website, I used HTML5's pushState() and popState in links to increase the speed. However, this doesn't really change the real URL and it looks like it will affect and mess up the Google Analytics's code. (doesn't show a url change)…
34
votes
3 answers

Detect application version change on a single page application

today a question was raised here and I don't have an evident answer. Assume that we concatenate and minify all resource files (CSS and Javascript) and declare them in the "Master-Page". On a multi-page app, if a CSS file changes it will be recharged…
AlexCode
  • 4,055
  • 4
  • 33
  • 46
34
votes
4 answers

vue.js - Organize big single page application with multiple views

I'm playing with new MVVM framework - Vue.js (http://vuejs.org/). It was really nice in simple examples and demos but now I'm trying to create big SPA with multiple views and I'm realizing that the best pattern how to do it is not described in…
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
34
votes
7 answers

Print a div using javascript in angularJS single page application

I have a single page web application using angularJS. I need to print a div of certain page. I tried the following: The page contains few div (print.html)
Do not print
Print this div
34
votes
1 answer

Where are these poll requests from SignalR coming from?

I have a SPA application using Durandal. My program starts to have a http request…
mehrandvd
  • 8,806
  • 12
  • 64
  • 111
33
votes
1 answer

A full explanation for the ResolvedFileToPublish XML element?

By default, the ASP.NET Core SPA project templates have a section in their .csproj files like so:
Jez
  • 27,951
  • 32
  • 136
  • 233
32
votes
1 answer

How to serve index.html with web api selfhosted with OWIN

Should be an easy question, just can't find the answer. I have an SPA (AngularJS) with web api which is self hosted with Owin. I use Nancy to serve the page, but I would like to get rid of Nancy and use Index.html as my single page. I've seen this…
Burjua
  • 12,506
  • 27
  • 80
  • 111
32
votes
2 answers

Knockout 'flickering' issue

I'm building a SPA (Single Page Application) using KO. the application looks like a book and the user can flip pages. The problem is that every time a page loads, there is a short moment where the page 'flickers' and the user sees the unstyled…
Tomer
  • 17,787
  • 15
  • 78
  • 137
31
votes
1 answer

Does React.js require app to be a single page

I am going around React.js and my question is simple: does my app have to be a single page app if I use React? If no then how do I control components outside of them? By FLUX? Any other standard methods? If yes then are there any libraries to…
Dmitry Istomin
  • 485
  • 1
  • 4
  • 8
30
votes
2 answers

Dealing with expired access tokens in OAuth2 implicit grant

The specification of OAuth2 states that an authorization server must not issue a refresh token when using implicit grant. In our use case we protect a RESTful API with OAuth2 and use a Single Page Javascript application as a client for this API. As…
29
votes
7 answers

Handling single page application url and django url

I have a single page application created in Vue.js that utilizes the HTML5 History Mode for routing, and the html file is served with Django. The urls.py of django is like so: urlpatterns = [ url(r'^$', views.home), url(r'^admin/',…
Robin
  • 5,366
  • 17
  • 57
  • 87
29
votes
1 answer

Call function on directive parent scope with directive scope argument

I am developing a directive which shows and hides it's contents based on a click event (ng-click) defined in it's template. On some views where the directive is used I'd like to be able to know if the directive is currently showing or hiding it's…
Nick
  • 19,198
  • 51
  • 185
  • 312