durandal


Durandal modal/dialog context that allows scrolling on mobile devices

旧街凉风 提交于 2020-01-25 01:09:22
问题 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, among other things, "display your dialog's view centered on the screen." Observationally, I can see that this means centering the dialog in the viewport--which means that as you scroll up and down, it remains in the same location, in the middle of your viewport. This works fine a screen large

ko.validation.group did not detect my errors on my nested observableArray

陌路散爱 提交于 2020-01-24 10:07:45
问题 I develop a project with Durandal/Breeze using intensive Knockout bindings. I have a view which is using the following observable: packing - description - weight - ... - isotopes - name - activity - ... As you can see above: my packing observable contains an isotopes observableArray inside. This packing object is filled from breeze with a query. var query = entityQuery.from('Packings') .where('id', '==', packingId) .expand('isotopes'); I try to set validation in place for all of this using ko

Dynamic composition using knockout and durandal doesn't work

北战南征 提交于 2020-01-16 00:40:26
问题 I have a strange problem while using Durandal/Knockout. In some cases the binding doesn't work properly. I've simplified my situation which came in this question. I'm setting composition info somewhere in my code like: compositionInfo({ model: viewModelInstance, view: viewName, activate: viewModelInstance.activate }); And this is my view: <div id="service-container" data-bind="compose: { model: compositionInfo().model, view: compositionInfo().view, activate: compositionInfo().activate}"> At

inserting dynamic html into durandal views

浪子不回头ぞ 提交于 2020-01-15 10:43:28
问题 I am dynamically inserting html in durandal views but it does'nt work can any one help me out in that? my sample html is in durandal view <div data-bind="foreach:arrayofmodels"> <div data-bind="html:dynamichtml"/> </div> in my model(not view model) which is going to insert dynamic html dynamichtml(<span data-bind="click:Mymodelclickfunction"/>); in my viewmodel var arrayofmodels=ko.observableArray(); vm={ arrayofmodels:arrayofmodels; } return vm; there is a separate function to get list of

inserting dynamic html into durandal views

╄→尐↘猪︶ㄣ 提交于 2020-01-15 10:43:17
问题 I am dynamically inserting html in durandal views but it does'nt work can any one help me out in that? my sample html is in durandal view <div data-bind="foreach:arrayofmodels"> <div data-bind="html:dynamichtml"/> </div> in my model(not view model) which is going to insert dynamic html dynamichtml(<span data-bind="click:Mymodelclickfunction"/>); in my viewmodel var arrayofmodels=ko.observableArray(); vm={ arrayofmodels:arrayofmodels; } return vm; there is a separate function to get list of

Using AMD module as an Aurelia ViewModel

孤者浪人 提交于 2020-01-15 07:27:10
问题 I was playing with Aurelia and seems pretty nice, I use Durandal for some projects and this definitively suit my needs. Use the new class definition from EC6 is awesome. But now I'm preparing something in which I need to use a classic AMD modules with requireJs, something like this one: define("testModule", [], function() { "use strict"; console.log('testModule loaded'); var testModule = function() { var that = this; this.variable = 10; that.getVariable = function(){ alert('function executed

1 viewmodel multiple routes: lifecycle

て烟熏妆下的殇ゞ 提交于 2020-01-11 10:15:13
问题 I'd like to have a couple of different routes pointing to the same view/viewmodel and I have managed to make this happen. { route: 'formulation', moduleId: 'formulation', title: 'Formulation', nav: 6 }, { route: 'fabrication', moduleId: 'test', title: 'Fabrication', nav: 7 }, { route: 'fabrication/:studyId', moduleId: 'test', title: 'Fabrication' }, { route: 'characterization', moduleId: 'test', title: 'Characterization', nav: 8 }, However, I'm running into a bit of a problem with the

Durandal JS and Google Plus Sign in Javascript API

廉价感情. 提交于 2020-01-06 12:56:39
问题 So I'm trying to build a mobile app using Durandal. However, I am having trouble to do so with Google plus JS API integration. I think here is the problem: The javascript client for gapi comes with asynchronous loading, so durandal initialization will crash having gapi undefined and because of this, the css components also do not render properly also. I have tried putting the following script tags in the login.html file of my view for login.js or even in the require.js section of my main.js

Durandal JS and Google Plus Sign in Javascript API

為{幸葍}努か 提交于 2020-01-06 12:55:49
问题 So I'm trying to build a mobile app using Durandal. However, I am having trouble to do so with Google plus JS API integration. I think here is the problem: The javascript client for gapi comes with asynchronous loading, so durandal initialization will crash having gapi undefined and because of this, the css components also do not render properly also. I have tried putting the following script tags in the login.html file of my view for login.js or even in the require.js section of my main.js

What am I doing wrong here returning viewmodel?

冷暖自知 提交于 2020-01-06 08:26:09
问题 I am trying to convert this to durandal/hottowel. viewModel: define(['plugins/router', 'knockout', 'services/logger', 'durandal/app', 'mapping', 'services/routeconfig', 'services/dataBindingHandlers', 'services/appsecurity'], function (router, ko, logger, app, mapping, routeconfig, dataBindingHandlers, appsecurity) { function activate() { logger.log(viewModel.title + "'s View Activated", null, viewModel.title, true); return true; } var viewModel = { activate: active, title: 'Overview', query:

工具导航Map