Questions tagged [durandal-2.0]

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.

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
284 questions
1
vote
1 answer

Durandal not passing parameters to MVC controller action

I'm having a problem using parameters in Durandal for an ASP.NET MVC application... I use MVC Route Attributes, for example: [Route("admin/pages")], [Route("admin/blog")], etc.. And I integrate Durandal as…
Matt
  • 6,787
  • 11
  • 65
  • 112
1
vote
2 answers

How to display a "not found" page with parameterised route in Durandal

I have a Durandal application, and I use router.mapUnknownRoutes to display a user-friendly error page if the URL does not correspond to a known route. This works fine -- if I go to, say /foo, and that doesn't match a route, then the module…
leftclickben
  • 4,564
  • 23
  • 24
1
vote
2 answers

durandal IE8 "undefined is null or not an object" error in viewEngine.js

I get the above error in IE only. the line that throws the error is apparently element.setAttribute('data-view', viewId); in viewEngine.js createView: function(viewId) { var that = this; var requirePath =…
Martin
  • 1,112
  • 1
  • 11
  • 31
1
vote
1 answer

TypeError cyclic object value when trying to change a ko.observable from an jquery trigger inside jquery DataTables

I'm trying to change a ko.observable value when clicking on a jquery.DataTables table-row to the id of that row. I'm instantiating the DataTable in durandal's attached function after I fetched data from the server in the activate cycle. Even without…
Martin
  • 1,112
  • 1
  • 11
  • 31
1
vote
1 answer

Splat Route Not Found (DurandalJS)

I have settings splat route configured in shell.js: router.map([ { route: 'settings*child', moduleId: 'views/settings/main', nav: true } ]).buildNavigationModel(); And inside the views/settings/main.js file i've created child router: var…
Fariz Azmi
  • 713
  • 1
  • 6
  • 21
1
vote
2 answers

How to call global function on route change within Durandal?

Given the following scenario for our Durandal application: When a customer visits certain URL's of our SPA we would like to present him a dialog/pop-up. For the initial load this is not a problem, we call a function from the activate callback…
Andrew
  • 5,395
  • 1
  • 27
  • 47
1
vote
1 answer

Durandal view adding ".js" to filename

I've got a Durandal 2.0 SPA which works just fine from one context but not from another. For the one that does not work the shell.html view is attempting to be loaded with using shell.html.js. Any idea why the additional .js is being added to the…
1
vote
1 answer

How to go to a route without it being logged in browser history

I never want my logout route to show up the browser history. How can I configure the logout route to never log to the history. I know I can call activate(silent: true) but this doesn't solve my issue. This is how I am setting up my…
izikandrw
  • 1,703
  • 3
  • 14
  • 23
1
vote
1 answer

creating two navigation from the main nav in durandal

i have seen this question Durandal js router setup and would like to ask add a type within the durandal main navigation ... here is my code in shell,js define(function (require) { var router = require('plugins/router'); return { …
kabue7
  • 59
  • 2
  • 10
1
vote
1 answer

How to include SignalR with gulp build process?

When I run my Durandal app with main.js (not minified), it loads signalr.core and signalr.hubs correctly, however, after building with gulp, it fails to load signalr.hubs. Here is my RequireJS config: requirejs.config({ paths: { 'text':…
Cameron Tinker
  • 9,634
  • 10
  • 46
  • 85
1
vote
1 answer

Durandal: how to call CanActivate() method

I am using HotTowel SPA template (with Durandal 2.0), and I am implementing the navigation based on user's credentials. For example, if user is a member of a particular domain group, he is allowed to see all the views, if not, only one view and so…
1
vote
2 answers

How to preselect a data-bound bootstrap tab

This Durandal 2 knockout markup generates tabs with appropriate content but no tab is marked active.
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
1
vote
2 answers

.then .done promises not working in durandal spa using knockout and js

I am working on a SPA developing in Durandal using Knockout jQuery and Require. My problem is when I make ajax calls to my API I don't actually get my data outside the .then statement(when I substitute my Get method with the line commented out…
mboko
  • 359
  • 6
  • 16
1
vote
1 answer

Durandal View not loading correctly occasionally and always when minified

We've found a fairly insidious problem with a Durandaljs 2.1 application which has not really come to light previously. Essentially the error we have received appeared to be a 404 error. However we have added a little additional error tracking and…
Captain John
  • 1,859
  • 2
  • 16
  • 30
1
vote
1 answer

How can I cancel the ongoing navigation?

I'm trying to prevent navigating to most of my sites' pages when user is not yet logged in. So this is the code I started to write to solve that issue: router.on("router:navigation:processing", function (instruction, usedRouter) { if…
chrisdot
  • 659
  • 6
  • 19