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 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 - get access to its corresponding view?
SB2055
  • 12,272
  • 32
  • 97
  • 202
1
vote
0 answers

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 == cancel) { alert('canceled'); } …
RobVious
  • 12,685
  • 25
  • 99
  • 181
1
vote
1 answer

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 on the first page the tabs inside of this widget…
1
vote
2 answers

How to use google universal analytics in Hot Towel durandal SPA + typescript

I'm building app based on Hot Towel Template. Fall into issue with Google Analytics. I'm completly new in that and here is what i've done so far: 1) registered in google analytics account 2) in my index.cshtml file just before closing tag i…
1
vote
1 answer

Durandal router - how to define view as modal in routes definition

How can I declare view to be opened as modal directly on click? My route's definition is: var routes = [ { route: '', moduleId: 'home', title: 'My Apps', nav: true }, { route: 'aboutus', moduleId: 'aboutus', title: 'About Us', nav: true }, …
1
vote
2 answers

Durandal + Typescript: Viewmodel constructed on every route activation

I'm using Durandal with Typescript. My Viewmodel constructor is being called for every visit to that route. This seems like a waste. Shouldn't the state in the viewmodel be kept between different activations and then only the activate() on that…
Anders
  • 1,216
  • 5
  • 14
  • 28
1
vote
0 answers

Durandal 2.0 observable plugin with custom binding

I have a problem with observable plugin and custom binding. Observable plugin works great with standard binding. I have created typeahead custom binding, code below. The last part of the plugin is the problem, if the value is normal observable it…
Tero
  • 31
  • 2
1
vote
2 answers

Is there any kind of wildcard operator in the Durandal observable plugin, to subscribe to a change in any property?

Is there any kind of wildcard operator in the Durandal observable plugin, as there is in (for example) JsObservable? The Durandal observable documentation gives this example: var observable = require('plugins/observable'); var viewModel:{ …
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
1
vote
1 answer

Errors in Durandal activate function

I've been struggling with error handling in durandal. I've found it is desirable to to place much much of the logic for rendering views etc in the activate function. This was working well untill I noticed a few programming errors caused the whole…
Captain John
  • 1,859
  • 2
  • 16
  • 30
1
vote
1 answer

Twitter Typeahead, Knockout JS, and Twitter Bootstrap 3 not playing nicely

I'm attempting to get the knockout-bootstrap custom binding for typeahead jQuery working with Bootstrap 3 so that I can use it with Durandal 2.0, but it isn't working quite yet. The original binding is the…
1
vote
2 answers

DurandalJS: Keeping data across a session

I have decided to create a separate folder called "controllers" for my AJAX requests, models and data arrays, so in case I will need the same requests on multiple pages, I wouldn't have to repeat my code. So for example on 'app/page1/index.html' I…
Ted B.
  • 65
  • 8
1
vote
0 answers

Durandal modal in modal issue

I'm trying to call custom modal inside modal and catch the retrieving data. So I'm receiving second modal's data inside first modal, but the first modal's buttons crash for parent viewmodel and does not send data, even can't click on buttons, no…
nikoloza
  • 968
  • 2
  • 12
  • 30
1
vote
1 answer

how to defime routing for multiple subviews

I am developing and application using durandal. I have two sections in my page with different navigation menu. I am using composition to keep make these subviews. But I am not sure how to define routes for these sections.
1
vote
0 answers

Where to trigger application of bindings

In a Durandal app I have a dialog containing a view bound to a viewmodel. The label elements for each of the input elements includes a warning glyph done with icon-warning-sign. The visibility of each glyph is controlled by data-binding like…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
1
vote
0 answers

Running a durandal app with the main-built file results does not work

I am having some problems with the optimized code that weyland generates. Here is what I did so far: This is my project structure: This is my weyland-config file: exports.config = function(weyland) { weyland.build('main') .task.uglifyjs({ …
aleczandru
  • 5,319
  • 15
  • 62
  • 112