durandal

Bootstrap Hover Dropdown Plugin not works in durandal view nav.html

旧城冷巷雨未停 提交于 2019-12-11 14:45:12
问题 I am using hot towel SPA template. i am trying to use at Bootstrap Hover Dropdown Plugin but hover over drop down effect never triggers. nav.html contains <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="false"> Account <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><a tabindex="-1" href="#">My Account</a></li> <li class="divider"></li> <li><a tabindex="-1" href="#">Change Email</a></li> <li>

When to add extend additional complex types onto a Breeze entity

[亡魂溺海] 提交于 2019-12-11 13:51:43
问题 I want to load an entity from the database, and then using it's ICollection (from the model class) load up some child data. This would be simple enough to do from individual view models if it was a 1 to many relationship, but I have a bit more complex structure - Parent has many children. Each child has many grandchildren, that need to be linked back to the proper child. The hierarchy needs to remain in tact. The other options that I have come up with so far may not be the best way so I my

TinyMce disappears in SPA - Knockout binding evaluated twice causing editor to fail

女生的网名这么多〃 提交于 2019-12-11 12:36:19
问题 I’m trying to implement TinyMCE into John Papa’s HotSpa template . I’m currently using Knockout 3.1.0 , and Durandal 2.0 . For some unknown reason, my custom knockout binding init method is triggered only once on first load, but twice when view is refreshed. By refresh, I mean using durandal router, I navigated to the same view again (but with different parameters). It still went through the whole durandal life cycle, hooks of deattached and attached are called again. I had some debug code in

radio button checked binding html5, durandal

谁说我不能喝 提交于 2019-12-11 12:16:18
问题 even that I see very many similar questions in this site, no one of them answer to my question. So pleas, don't be angry with me that I discuss this subject again. I work in durandal project, I have html pages with javascript files behind. I have two radio button in one of the pages. I want their "checked" attribute to be binding to a variable in the view-model behind. It is looked simple... but it is not! I try two ways, any one of them didn't succeed: first-way: in the html: <input type=

Composing separate module instances in Durandal

对着背影说爱祢 提交于 2019-12-11 10:04:16
问题 I am composing the same form multiple times in the same module view but when I change the data in one field it reflects on every forms. Here is some cleaned up code. As you can see I made sure not to use the singleton pattern for the form I want to compose multiple times... view.html <button data-bind="click: append">Append</button> <div data-bind="foreach: odbcForms"> <div data-bind="compose: { model: $data, activationData: settings }"></div> </div> viewmodel.js define(['knockout', 'forms

Wait for async completion before returning

£可爱£侵袭症+ 提交于 2019-12-11 09:20:13
问题 This code returns a config object, and eventually populates it with knockout observables. define("config", [], function () { var config = {}; $.ajax({ url: "api/Config", success: function (result) { for (pname in result) config[pname] = ko.observable(result[pname]); }, }); return config; }); It works in terms of populating the config object with settings, but it doesn't finish until after one of my views has applied bindings, and this causes problems at runtime. How would you set this up to

router.guardRoute is not being called

对着背影说爱祢 提交于 2019-12-11 08:56:20
问题 This is probably a simple one.. I am trying to override the routers guardRoute function and it seems that my version is not being called. Code app.start().then(function () { router.useConvention(); viewLocator.useConvention(); app.setRoot('viewmodels/shell', 'entrance'); router.handleInvalidRoute = function (route, params) { logger.logError('No route found', route, 'main', true); }; router.guardRoute = function (routeInfo, params, instance) { logger.logError('guardRoute called', routeInfo,

Durandal / Knockout - global observable

孤街醉人 提交于 2019-12-11 08:15:25
问题 Context In my shell.html I have put a language selection into the header section. It looks like this: <select class="form-control select2" data-bind="options:languages, optionsText:'label', optionsValue:'code', value:selectedLanguage"> </select> My shell.js: define(['plugins/router', 'durandal/app', 'knockout'], function (router, app, ko) { return { router: router, selectedLanguage: ko.observable(), languages: [ {code: 'cs', label: 'čeština'}, {code: 'sk', label: 'slovenský'}, {code: 'en',

Durandal js router setup

时光毁灭记忆、已成空白 提交于 2019-12-11 07:26:06
问题 I've managed to get a simple router working and even created a child router for my submenu but there are one or two things I'm not sure of why they're there. The docs give you a basic leg up and then you're on your own. So I'm reading the docs from here: http://durandaljs.com/documentation/Using-The-Router.html First, there's mention of "splat" routes but it doesn't really explain what they are or how you might use it. All you get is an example bit of JS which means nothing without showing

Using Durandal dojoConfig and ESRI Maps

南楼画角 提交于 2019-12-11 05:29:07
问题 I'm trying to get ESRI maps working with Durandal and came across this link in the Durandal docs DurandalEsri This seems to work but now Durandal is having problems finding some of my .js files. If I leave the following dojoConfig out my scripts are found but then the maps won't work. `var dojoConfig = { baseUrl: './', async: true, tlmSiblingOfDojo: true, parseOnLoad: false, aliases: [['text', 'dojo/text']], packages: [ { name: 'esri', location: '//serverapi.arcgisonline.com/jsapi/arcgis/3.5