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-2.0
Filter by
Sorted by
Tagged with
1 vote
3 answers
1k views

gulp-durandal TypeError: req.toUrl is not a function

I try to implement gulp to my durandal project as explain on Durandal gulp doc main.js file is successfully build, but when trying to click something that will open a modal dialog, it will show this ...
Fariz Azmi's user avatar
5 votes
1 answer
922 views

Durandal - View Not Found. Searched for "/" on intermittent

I wonder if anyone has had a similar problem with Durandal.js. I am getting an intermittent "View Not Found. Searched for" error, which is hard to replicate as only happens very occasionally. It ...
rjmacarthy's user avatar
  • 2,173
0 votes
0 answers
100 views

Durandal 2.0: how to not load anything/ module on start?

How can I not to load any module or page when I start the durandal app? I want to load the page content from server side programme (PHP & MySQL) into <div id="applicationHost">..</div&...
Run's user avatar
  • 56.1k
0 votes
0 answers
119 views

I'm getting an occasional "flash" of a previous page when navigating in Durandal

When the app has been inactive for a while and I click on a navigation link, I see my "page isnavigating" spinner rotating for a few seconds and then just before the new page loads, the old page I ...
TheMook's user avatar
  • 1,531
1 vote
1 answer
187 views

How to combine optional parameter route with static route on the same name (Durandal router)

I have working router configured inside shell.js: router.map([ { route: 'messages', moduleId: 'views/messages', nav: true }, { route: 'messages/create', moduleId: 'views/messagesCreate', nav: ...
Fariz Azmi's user avatar
4 votes
1 answer
669 views

Durandal 2 / activate method called only once in child route

In a Durandal 2.x app I have a view that needs to fetch new data every time the user navigates to it. This view is served through a child router: define(['plugins/router'], function(router) { var ...
Sergi Papaseit's user avatar
0 votes
1 answer
472 views

Turn off history for Durandal child router

I'm using the child routers in Durandal for tab control. However whenever you change tab, it creates a history event. Again and again. It has made my "Close" button pointless because I cannot router....
Tim's user avatar
  • 3,018
1 vote
3 answers
940 views

How to use durandal router to activate dialogs?

I would love to a #signin route that would open a dialog on top of whatever page there was before. Let's consider this example app this the following routes: router.map([ {route: '', moduleId: '...
Dziamid's user avatar
  • 11.4k
1 vote
1 answer
1k views

Autobahn 0.9.5 (AMD) - Error during WebSocket handshake

I'm trying to implement autobahn 0.9.5 on my SPA project using DurandalJS. var ab = require('autobahn'); live = new ab.Connection( { url: 'ws://localhost:8080', ...
Fariz Azmi's user avatar
0 votes
1 answer
110 views

isActive is not true for two routes that route to the same moduleId in Durandal 2.1

I have a pretty basic route that I barely modified from the Durandal Documentation. Basically, I'm setting up a default route, that should route to my home screen. define([ 'durandal/system', ...
crush's user avatar
  • 17k
0 votes
1 answer
91 views

converting a .net durandal SPA from http to https

i have a .NET Single page application (Durandal). i want to convert it from HTTP to HTTPS in order to make it secure and add the certificates thing. how can i do that ?
user3117281's user avatar
1 vote
0 answers
88 views

DurandalJS: Create childRouter inside widget?

It's possible to create childRouter inside the widget that can be re-used in other page again by using a widget? This is how my directory tree looks like: * app * views * dashboard (route: /...
Fariz Azmi's user avatar
0 votes
1 answer
121 views

Durandal: Include splat inside compose binding

I have this splat route configured inside shell.js router.map([ { route: 'projects*modal', title: 'Projects', moduleId: 'views/projects', nav: true }, ]).buildNavigationModel(); and this is how ...
Fariz Azmi's user avatar
0 votes
2 answers
65 views

How do I avoid expanding sections when using a composed view?

At various places in my single page app I use composition to compose one view into another. At the same time I have noticed some animation effects when certain pages load, almost as if sections were ...
Rhynier's user avatar
0 votes
1 answer
89 views

Phonegap device AMD module

Here is my code which suppose to handle device and network events for my phonegap application define(['jquery', 'knockout'], function ($, ko) { var deviceHandler = { Online: null, Offline: ...
Rati_Ge's user avatar
  • 1,260
1 vote
1 answer
1k views

How can I have a seperate login page using Durandal that has a different layout then the shell?

I've read through Durandal login page redirect pattern wow, lots of code to do what I'd think would be pretty simple. I've also read through https://groups.google.com/forum/#!topic/durandaljs/...
rball's user avatar
  • 6,935
0 votes
1 answer
897 views

Tabs and child routers - Durandal

I am having a hard time understanding Durandal child routers. I would appreciate a little help from the community. I would like to create a child router underneath my main tab router. If a user clicks ...
john Doe's user avatar
1 vote
2 answers
783 views

Durandal how to attach view and don't show it untill it's ready?

Here is unusual scenario I'm trying to implement: I got gmap module where Google Maps is asynchronously loads. I'm using following code to properly attach Google Maps: composition.addBindingHandler('...
BillyZ's user avatar
  • 45
1 vote
1 answer
80 views

Durandal is not unwrapping observables

I am upgrading my knockout project to durandal and noticed that some standard knockout bindings are not working as expected. Knockout does not make any difference between this: <!-- ko text: ...
Dziamid's user avatar
  • 11.4k
0 votes
1 answer
51 views

Cannot make data to be bind-able inside of the widget

once i change value of input, my main model ($data.name) is not updated. Thanks in advance some view <td data-bind="editableLabel: { name: $data.name }"></td> widget's view <span ...
eugeneK's user avatar
  • 11k
0 votes
1 answer
53 views

Durandaljs pushState changed the behavior on 1 page

I'm using durandal pushState for SEO. All pages working correct but one. When I load this page - it loads(activates) 2 times instead of 1. When I make 'pushState:false' - this page works correct. What ...
Andrey's user avatar
  • 311
0 votes
1 answer
572 views

Durandal observable array not updating

I copied the pagination example from the Durandal Samples into my code and I have noticed that the function gets called just once. Changing the values on the observable does not have any effect on the ...
user1249065's user avatar
0 votes
1 answer
2k views

Uncaught Error: Script error for: durandal/router

I am trying to use the durandal router, but I have these 2 errors on my console: Uncaught Error: Script error for: durandal/router and of course this: Failed to load resource: the server responded ...
Luis Valencia's user avatar
0 votes
1 answer
51 views

How to list students for every course in knockout and durandal in SPA

Here is my class : public class Course : BaseEntity { public string Name { get; set; } public string Description { get; set; } public virtual int? TeacherId { get; set; ...
smurf's user avatar
  • 1
1 vote
1 answer
528 views

Durandal modal/dialog context that allows scrolling on mobile devices

Durandal provides a modal dialog facility which works great on desktop devices, and it allows you to control the presentation of the dialog via the "dialog context". The default dialog context will, ...
Josh's user avatar
  • 7,322
1 vote
1 answer
609 views

Deactivate composed viewmodel

There is a lot of questions about this but I cannot find any answer that works with the latest durandal version (2.1.0). I am showing a child viewmodel inside my page using this: <div data-bind=...
Leo's user avatar
  • 7,409
1 vote
3 answers
2k views

SPA: Separating backend administration from client side

I’m working on a SPA built with DurandalJS, which is hosted on app.example.com. The API is hosted on api.example.com. We're now planning to add backend administration for ourselves, to overlook our ...
Norbert's user avatar
  • 2,771
3 votes
1 answer
3k views

implementing html5 drag and drop photos with knockout js , durandal 2.0

I have a list of photos in a knockout js viewmodel and I want to be able to swap among them(actually the more correct term is copy one on top of another). Here is my simplified viewmodel: define(['...
Elena's user avatar
  • 839
4 votes
2 answers
614 views

Durandal recursive composing of template

I am trying to compose a template in my application recursively. I have a multi-dimensional array that I am trying to flatten out into table rows. I can get the first level to work great, but I ...
Nick H's user avatar
  • 245
0 votes
1 answer
144 views

Wrapping a control into a Durandal Widget

I posted this onto the durandal discussion groups, but want to cover my bases on it: https://groups.google.com/forum/#!topic/durandaljs/PWgPUHcpzic Basically, I want to see if anyone has successfully ...
Richard B's user avatar
  • 1,581
1 vote
0 answers
215 views

Cached data returned when making same Web API call consecutively using Breeze.js

I am facing a strange issue while writing a Breeze.js with Durandal SPA (largely based on John Papa's Great SPA Jumpstart (https://github.com/johnpapa/PluralsightSpaJumpStartFinal) training ), the ...
akhil's user avatar
  • 391
0 votes
0 answers
194 views

Knockout Custom Binding - Works in jsfiddle, but not in Durandal

Absolutely love Durandal's architecture/clarity. But have ran into trouble getting durandal 2.0.1 to recognize any custom knockout binding. My example View contains: <div data-bind="test: {}" /&...
Ciel's user avatar
  • 591
0 votes
1 answer
94 views

Allowing user Re-size durandal dialog box

I have a durandal dialog box, i want user to be able to increase or decrease the size of the box . Please note that i am not asking for adjusting the width automatically depending on the contents ...
user3117281's user avatar
0 votes
0 answers
266 views

How to Unit Test a Durandal View

I'd like to test the binding of a durandal view to it's viewmodel; to ensure that the property names on the view and viewmodel are in sync. Ideally using the durandal composition engine in order to ...
Adam Mills's user avatar
  • 7,959
0 votes
1 answer
157 views

Setting dynamic page titles in Durandal 2.1.0

I use an observable inside the updateDocumentTitle function that gets a new value after completing an ajax request. But I noticed that the updateDocumentTitle function doesn't fire again after the ...
Norbert's user avatar
  • 2,771
1 vote
1 answer
454 views

Responsive Dialog in Durandal 2.1?

I found the following: Responsive Durandal dialog However I don't see any documentation on making the dialog responsive in 2.1. I have a dialog that extends in height as the user selects stuff - ...
SB2055's user avatar
  • 12.6k
1 vote
1 answer
244 views

Durandal 2.1 - accessing view from viewmodel?

I have the following in my viewmodel: dialog.getContext().reposition(vm); But it's not working, because I'm supposed to be passing the view, not the viewmodel. How can I - from within a viewmodel ...
SB2055's user avatar
  • 12.6k
0 votes
2 answers
120 views

Breeze and Durandal observable plugin

I have been experimenting with the Hot Towel SPA and was successful in getting a view model and view to work using the ko.observables. The results from a call to the Breeze executeQuery are loaded ...
Alan Rutter's user avatar
0 votes
1 answer
510 views

Durandal 2.0 Dialog Repositioning

At the bottom of the durandal docs for dialogs / modals (http://durandaljs.com/documentation/Showing-Message-Boxes-And-Modals.html) there's some syntax for repositioning a dialog. The dialog I have ...
SB2055's user avatar
  • 12.6k
3 votes
1 answer
301 views

Global AJAX Settings Not Firing on Custom Modal (DurandalJS)

I have DurandalJS Single Page Apps, all data is retrieved from API request and required header include X-Auth-Token to be set. Everything is works except when I call custom modal to display an ...
Fariz Azmi's user avatar
3 votes
1 answer
2k views

Building multiple navigation routes to the same module with DurandalJS

I would really like to take advantage of Durandal's buildNavigationModel() method and bind my UI nav to the router.navigationModel. But in my case, I am essentially wanting three menu items, which ...
Stephen James's user avatar
1 vote
0 answers
346 views

Custom inner template (view) for dialogs / modals?

I have the following: app.showMessage('template', book.title(), [save, cancel]).then(function(result) { if (result == save) { alert('saved'); } else if (result == ...
RobVious's user avatar
  • 12.8k
0 votes
1 answer
128 views

DurandalJS - Enforcing Full Activation Cycle on Page Root (aka: fire "deactivate" on app.setRoot())

[Edit] There's also Google Groups thread over here. I'll try to keep both updated as I learn more. According to the Durandal Documentation the page Root View Model only implements limited Activator ...
Oliver Kane's user avatar
0 votes
1 answer
62 views

Durandal dialog Call back Function

In my view model I have a grid, if user click on Edit button on the row it will popup a dialog with row values, if user click on Edit button will close the dialog then I need to reload the grid. My ...
rook ....'s user avatar
  • 156
0 votes
1 answer
195 views

Breeze query using withParameters and expand, not expanding

I needed to implement some business logic on the server side during the process of fetching entities to ensure that the user had permission to the item being retrieved. To accomplish this, my client-...
George Durzi's user avatar
  • 1,632
0 votes
1 answer
51 views

Durandal local caching

I am building a SPA using DURANDAL and Asp.Net WEB API. I would like to retrieve a dictionary table (lookup table) and cache it on the client side.. basically have a viewmodel with a dictionary: ko....
Gabriel's user avatar
  • 15
2 votes
1 answer
519 views

Keyboard shortcuts and Durandal dialogs

Using Durandal, app.showMessage(message, title); shows a modal dialog with the supplied message and title, and a single primary button OK. All this is styled by Bootstrap. It doesn't seem to ...
Peter Wone's user avatar
  • 18.3k
0 votes
1 answer
61 views

DurandalJs ignore anchor with #

I'm trying to implement Zurb Foundation tabs in a DurandalJS app. Zurb Foundation uses # in their tab HTML structure. The # is used to link tab with it's contents. <ul class="tabs" data-tab> ...
Tom Schreck's user avatar
  • 5,247
1 vote
1 answer
235 views

Implementing One Widget on Multiple pages Durandal 2.0

I am trying to use a single widget on multiple screens. However I am having an issue where when I load the second instance of this widget on a different page and then try to use the first widget again ...
Taran Beekhuis's user avatar
0 votes
1 answer
299 views

Durandal 2 upgrade redirect issue

Hello and thanks for taking a look at my issue. I have been migrating my SPA application to use the Durandal 2.0 library, following the sage advice from my oft savior, John Papa. And now that I have ...
James Fleming's user avatar