Questions tagged [durandal]

A cross-device, cross-platform client framework written in JavaScript and designed to make building and maintaining Single Page Applications (SPAs) faster and easier.

Durandal

A cross-device, cross-platform client framework written in JavaScript and designed to make building and maintaining Single Page Applications (SPAs) faster and easier. Visit the project site.

Durandal has strong support for MVC, MVP and MVVM.

Features

  • Clean MV* Architecture
  • JS & HTML Modularity
  • Simple App Lifecycle
  • Eventing, Modals, Message Boxes, etc.
  • Navigation & Screen State Management
  • Consistent Async Programming w/ Promises
  • App Bundling and Optimization
  • Use any Backend Technology
  • Built on top of jQuery, Knockout & RequireJS
  • Integrates with popular CSS libraries such as Bootstrap and Foundation
  • Make Your Own Templatable and Bindable Widgets

Browser Support

  • IE 6+
  • Firefox 2+
  • Safari 3.2+
  • Chrome 3+
  • Opera 10+

Dependencies

  • jQuery >= 1.8.0
  • Knockout >= 2.2.1
  • RequireJS >= 2.0.0
1354 questions
146
votes
6 answers

How to make a SPA SEO crawlable?

I've been working on how to make a SPA crawlable by google based on google's instructions. Even though there are quite a few general explanations I couldn't find anywhere a more thorough step-by-step tutorial with actual examples. After having…
beamish
  • 2,827
  • 3
  • 15
  • 16
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
32
votes
1 answer

MVC Authentication and Antiforgery token with Durandal SPA template

Some areas of my SPA need to be open to all users, and some areas require authentication. In these areas, it's the data loaded via AJAX that I want to protect. I have an authentication service (see below), which I add as a dependency in my durandal…
stooboo
  • 917
  • 9
  • 15
27
votes
6 answers

How to open a new tab with router.navigate in TypeScript

The following typescript code will always open in the current browser tab navigate($data: menuItem, $event: JQueryEventObject) { //... let a = $event.currentTarget as HTMLAnchorElement; router.navigate(a.href); } How do…
Danielle
  • 3,324
  • 2
  • 18
  • 31
16
votes
2 answers

How do I upgrade my Durandal.js app to Aurelia?

I have an existing Durandal.js app that takes advantage of all of the ES5 features but I want to upgrade it to the new Aurelia platform. What is the proper upgrade path and what is the simplest way to upgrade up front with as least pain as…
PW Kad
  • 14,953
  • 7
  • 49
  • 82
16
votes
3 answers

How to correctly chain conditional(?) promises with Q.js

I've still not quite got a complete understanding of promises so apologies if this is a simple misunderstanding. I have a function for deleting an item on a page but I have a specific behaviour depending on the state of the page. Psuedo code-wise…
Adam
  • 1,011
  • 1
  • 10
  • 25
16
votes
2 answers

Durandal login page redirect pattern

TL;DR What is a good pattern for requiring a user to login in order to view certain pages in a Durandal Single Page Application (SPA)? I need a system whereby if a user attempts to navigate to a "page" that requires them to be logged in, they are…
Chris
  • 44,602
  • 16
  • 137
  • 156
16
votes
2 answers

Durandal Caching Issue / Versioning Strategy

What's a good strategy for versioning Durandal js and html files? I noticed that, during development, your browser cache must be disabled in order for you to receive up to date files on each refresh. This is a must for during development. However,…
Alexander Preston
  • 1,665
  • 11
  • 15
15
votes
2 answers

Durandal and ASP.NET MVC conventions

I'm currently evaluating Durandal for use in an enterprise ASP.NET MVC application. However the default conventions used by Durandal seem to conflict with the MVC conventions I've grown accustomed to. The HotTowel MVC template by John Papa is…
Brett Postin
  • 11,215
  • 10
  • 60
  • 95
14
votes
2 answers

Durandal JS knockout Deferred updates

I am having an issue when enabling deferred updates in the knockout library. I have implemented Jquery datatables as a component, when navigating to a view that has this component i can see the following methods being called in…
Darryn Hosking
  • 3,118
  • 2
  • 20
  • 20
14
votes
4 answers

Durandal (knockout) app with multilanguage support

I am building multilingual support for the app I'm working on. After doing some research and reading SO (internationalization best practice) I am trying to integrate that in a 'framework-friendly' way. What I have done at the moment is…
Naz
  • 5,104
  • 8
  • 39
  • 63
13
votes
5 answers

MVC Bundling - Failed to load resource

What could be causing this? I'm working with a DurandalJS project that builds and runs locally just fine. When I try to deploy to an Azure Website, the app publishes but fails in the browser with: Failed to load resource: the server responded…
RobVious
  • 12,685
  • 25
  • 99
  • 181
13
votes
8 answers

How can I use cshtml files with Durandal?

I got the DurandalJS StarterKit template on VS2012... All works great... But in some views I need to do something like that: @if (Roles.IsUserInRole("Administrators")) {

Test

} However with durandal all my views are '.html' files... Is…
Junior
  • 154
  • 1
  • 1
  • 8
12
votes
1 answer

Knockout change event-handler

I am spending hours trying to get a simple event call working correctly in my durandal/knockout app. Context I have a list of languages that that the user can select from a select-box: