single-page-application

aspnetcore-spa (webpack) - when used in separate project builds unwanted js files

放肆的年华 提交于 2019-12-12 03:37:26
问题 I have a questions in regards to the aspnetcore-spa functionality. What im trying to do is to implement it based on the sample project from yeoman (with angular2) in a SEPARATE project. But im running into an issue with i suspect is caused by some missing configuration or something. To explain what i do the following procedure illustrates the problem: I generated a sample project using 'yo aspnetcore-spa' and selected angular2. I created an empty .net core project. I copied over the, as i

Caching with single-page application

久未见 提交于 2019-12-12 03:18:03
问题 I have an OpenUI5 app; my app have only one htlm page (index.html), some js file (for the logic-controller) and some xml file (for the view). The app is a single-page application; this is my index.html start page: <!DOCTYPE html> <html manifest="app.appcache"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta charset="UTF-8"> <!--<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta

angularjs2 SPA - how to change gulp task to prevent cannot get /page error

≡放荡痞女 提交于 2019-12-12 02:57:40
问题 the problem : i get "Cannot GET /heroes" or "Cannot GET /dashboard" errors when trying to reach http://localhost:9000/dashboard or http://localhost:9000/heroes i currently have a gulp task to setup the webpage: var http = require('http');<br/> var connect = require('connect');<br/> var serveStatic = require('serve-static');<br/> var open = require('open');<br/> var port = 9000, app;<br/> gulp.watch(PATHS.src, ['ts2js']); app = connect().use(serveStatic(__dirname)); http.createServer(app)

In single page application, how to store data and get data after refresh the page [closed]

二次信任 提交于 2019-12-12 02:22:56
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . Recently I have a problem with how to store data on a single page application. I want to ask how to store data and get the data back after refresh page in a Single Page Application. For example, I get 'user name' and it is shown on the navigation bar, but after I refresh the page, the 'user name'

Upload big files in SPA (angular + express)

三世轮回 提交于 2019-12-12 01:47:58
问题 Normal to upload file I do <form method='post' enctype='multipart/form-data'> <p><input type='text', name='name'/></p> <p><input type='file', name='image'/></p> <p><input type='submit', value='Wyślij'/></p> </form> What if I want send this form without page reload? I can use "new FileReader()" and bind base64 to $scope but with big files it doesn't work well. Can I upload my form without page reload in similar way like above? 回答1: I think you should looked at the directive which has been

Browser applications and auth tokens again

大城市里の小女人 提交于 2019-12-12 01:26:14
问题 I've been reviewing how we should handle OAuth authentication in our browser application (SPA), and there's a whole bunch of articles out there that makes it all really confusing... I'm really missing something concrete and best practice guidance for a very simple setup. We have this ASP.NET Web API 2 that's protected using tokens issued by IdSvr3. So far so good. Works with native clients and server apps. Now to the browser stuff... Looking at a sample such as JavaScriptImplicitClient which

single page application with MVC 4

那年仲夏 提交于 2019-12-12 00:59:08
问题 I just saw this video here: http://www.youtube.com/watch?v=vs8-l2Uo1cQ And i got cuple of questions. I am about to develop quite a complex web site with alot of reporting data(like diagrams) and more, before i saw this video i was certanly sure that i am going to use MVC 4 forms authentication solution. But right now i am conserned. Is singel Page application suitebale for complex solution? or is it only suitable for simple portfolio websites? No hate, its probably a stupid and obviouse

some java script seems to be overwritten by durandal

自闭症网瘾萝莉.ら 提交于 2019-12-11 21:08:10
问题 I am trying to implement a Single Page Application using the Hot Towel Template. Everything was fine until I tried to incorporate a CSS HTML template. I am using Durandal + RequireJS. My HTML for navigation bar is in nav.cshtml (I am using cshtml with Durandal) The same HTML if pasted in index.html before <div id="applicationHost"> it works fine. if Same is included inside applicationHost using Durandal nav view, it doesnt works properly. My nav.cshtml has one root and no spaces or comments.

Setting a knockout observable using sammy for routing

*爱你&永不变心* 提交于 2019-12-11 20:16:19
问题 I have a SPA using knockout JS for data binding and sammy for routing. I have a deck of cards that I am trying to have a dynamic routing to. My problem is that it doesn't work when I try to set a knockout observable from the routing function in sammy. My HTML, where I try to bind the name of the deck, looks like this: <!-- Create Deck --> <div id="createDeck" class="page" style="display:none;"> <input type="text" class="form-control" placeholder="Untitled Deck..." data-bind="value: $root.deck

React input onchange simulation not updating value using Jest and enzyme

自闭症网瘾萝莉.ら 提交于 2019-12-11 18:48:31
问题 I have a functional component as below const Input = () => { const [value, updateValue] = useState(""); return ( <input type="text" id="input" value={value} onChange={(e) => { updateValue(e.target.value); }} /> ); }; export default Input; and test as below const event = { target: { value: "Q" } }; input.simulate("change", event); expect(input.prop("value")).toBe("Q"); the problem is that simulation of the event is not updating state. I tried wrapper.update() as well but it is not working. you