single-page-application

Passing data between pages In a SPA using backbone.js

两盒软妹~` 提交于 2019-12-08 12:43:55
问题 Please forgive me if this question sounds very vague. I have looked all over the web and I can’t any examples on how to do this – this added with the fact I am really new to web development put me in a bit of a spot :) What I am looking to do is have a collection of “gallery” objects (loaded from a local json file) that displays the first image from each as a grid on a single page. When the user clicks an Image, a “galley details” page is loaded and shows the complete gallery plus the title

EmberJS (and other single page web apps) - How do you handle SEO, FB OpenGraph, Twitter, etc. metadata for different pages?

半世苍凉 提交于 2019-12-08 11:06:30
问题 As the title suggests, I am working on a single page application using Ember, but it is very important that individual pages are able to specify metadata for sharing (FB, Twitter) and have tailored SEO metadata. How do you accomplish this? We can't adjust the metadata after pageload, so my assumption is that we need a server side component which is reading the URLs and inserting the correct metadata when necessary to the response. Unfortunately, this seems like it would make the single page

What kind of questions should be asked when choosing between straight MVC4 and a SPA framework like Durandal or Angular?

半城伤御伤魂 提交于 2019-12-08 09:58:22
问题 I'm in the middle of making this choice right now and I don't know what kinds of questions I should be asking. One that I believe is valid: Do I need SEO / natively crawlable pages? If so, stick with MVC4. One question that I'm not sure about is the impact on performance - I think this is valid: Is initial load time very important? If so, stick with MVC4 (like stackoverflow). What are some other questions that should be asked that can help point a developer in the right direction here? PS -

Option url path UI-Router

守給你的承諾、 提交于 2019-12-08 08:04:18
问题 In my angular application, I am making heavy use of nested states with UI-Router. I am trying to create a parent state that determines the locale of the application based on a URL that has an optional locale path. For Spanish www.website.com/es/search For English www.website.com/search the '/es' is required for Spanish, but English is implied by the parameter missing and I would prefer to not have the '/en' . I want any child state of this one to inherit that locale value. $stateProvider

Sails js route static html

…衆ロ難τιáo~ 提交于 2019-12-08 07:17:05
问题 I want to completely separate the client and server sides in my sails js app. If I remove the '/' route, automatically it will serve a file named index.html from the 'assets' folder. I want to serve another file from the assets folder, how can I do it? 回答1: If you look at the middlewares that sails uses config/http.js order: [ 'startRequestTimer', 'cookieParser', 'session', 'myRequestLogger', 'bodyParser', 'handleBodyParserError', 'compress', 'methodOverride', 'poweredBy', '$custom', 'router'

AngularJS routing hides 404 responses for nonexistent routes

左心房为你撑大大i 提交于 2019-12-08 05:07:03
问题 I have noticed that GET requests for nonexistent paths don't return a 404 response. Instead, the client gets a "200 Ok", AngularJS renders the main view, and rewrites the path to / . A request for a nonsense URI is logged as successful in the server logs. If I understand correctly, the problem is that since AngularJS handles routing, the server has to accept a GET request for any URI and always respond by serving the client side of the app ("200 Ok" or "304 Not Modified"). For example, using

HowTo: Call from SPA (AngularJS based, Azure AD Protected) to WebAPI (WebAPI only, Azure AD Protected)

扶醉桌前 提交于 2019-12-08 04:54:44
问题 Hy All We have the following Scenario: Single Page Application (AngularJS based, Azure-AD protected). Like in this sample: https://github.com/AzureADSamples/SinglePageApp-AngularJS-DotNet Separate REST Service (WebAPI only, Azure-AD protected) with BusinessLogic, DAL, DataBase-Connectivity Security over Azure AD (ADAL) Azure-Configuration: Two WebApps (SPA and REST Service) One Directory with the above two Web-Apps as Applications SPA is allowed to call the REST Service Security-Configuration

Should I use a button or a link if the URL doesn't change?

ぐ巨炮叔叔 提交于 2019-12-08 04:46:25
问题 I'm building an app which works only with JavaScript enabled (otherwise, an appropriate message is displayed). There are a couple of screens in the app: game, tutorial, settings, about/credits. They look like separate pages, but it's all a single-page app. There are no URL changes when navigating between the screens. Should I use a button or an anchor in this case? It feels like an anchor, but there's no page to lead to, meaning that href would have to be # . Also an anchor will break common

How do I configure Undertow handlers to support proper rewriting for SPA bookmarking?

依然范特西╮ 提交于 2019-12-08 02:01:48
问题 I am trying to configure JBoss EAP 7 (via Undertow) to properly rewrite any SPA URLS back to the SPA's index.html using Undertow handlers. Unfortunately, my API is located at /api , so I need to let any requests pass through which start with /api . Here is my current configuration (lifted from another SO answer): not equals(%R, '/my-app') and not equals(%R, '/my-app/') and not equals(%R, '/my-app/index.html') and not path-prefix('/my-app/api') and not regex('/my-app/.*\.js') and regex('/my

Static files served by node.js on heroku - is it a good idea? [closed]

好久不见. 提交于 2019-12-08 00:51:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 months ago . I have Backbone powered single page app. App consists of couple of files: index.html javascripts/app.js javascripts/vendor.js stylesheets/app.css images/ -> image assets I want to add prerender.io service to my app to make it SEO-friendly. The easiest way of doing this for me is to use express.js hosted on