hottowel

activationData not getting passed in durandal

送分小仙女□ 提交于 2019-12-12 04:13:07
问题 I am using durandal version 1.1. From compose binding I am passing some extra parameters through activationData. But the child viewmodel does not get the value. It is always received as undefined in the activate method. <div data-bind="compose: { model: 'testmodel', activationData: {data : 10}, activate: true }"> </div> The activate method looks like: define(['durandal/app', 'durandal/system', 'durandal/plugins/router', 'services/logger', 'services/datacontext', 'config'], function (app,

Extending a breeze entity using TypeScript

允我心安 提交于 2019-12-12 01:54:00
问题 I am developing a website using HotTowel and TypeScript. In John Papa's excellent PluralSight course, he extended a breezejs entity by creating a constructor and using 'Object.defineProperty' to extend it. For example, he added a property called fullName as follows. NB: metadataStore is the breezejs metadata store function registerPerson(metadataStore) { metadataStore.registerEntityTypeCtor('Person', Person); function Person() { this.isPartial = false; this.isSpeaker = false; } Object

Route and subroute based on user in hottowel asp.net mvc4

你说的曾经没有我的故事 提交于 2019-12-11 15:08:28
问题 :updated can anyone help me found out how to create routes and subroute based on user is it possible to create a Widget that will do the job if so how this is how my menu looks like (note:all menu items together let us call it master ): -Home -shop -men -women -food -dog -human -cart -settings -user -images -themes let say i have the following userGroup: -Admin -visitors -vip -costumers -co-workers what i want to do ist some thing like if(user == Admin){ destroy the current menu then make a

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>

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,

Breeze JS: Is there a way to query entities from data.results?

痴心易碎 提交于 2019-12-11 07:45:22
问题 I have a Breeze web api controller, with methods that accept parameters and do some work, filtering, sorting, etc, on the server. On the querySucceeded, I'd like to do further querying to data.results. Is there a way to accomplish this? I got this working by exporting/importing data.results to a local manager, and do the projection from there. The projection is needed in order to use the observable collection in a vendor grid control. var query = datacontext.EntityQuery.from(

Module 'angularGrid' is not available! with ag-grid and HotTowel

烂漫一生 提交于 2019-12-11 03:35:28
问题 I’m somewhat new to AngularJS and the HotTowel toolchain. The bower install of ag-grid places appropriate (.css & .js) links in the index.html file. The dependency to ‘angularGrid’ has been attempted against different modules (e.g. app, core, etc.) with no success. Code excerpts are included below. At runtime, this results in a string of errors: [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:modulerr] Failed to instantiate module app.core due to: Error: [

containerless statements of knockoutjs is not working in hottowel SPA?

无人久伴 提交于 2019-12-10 23:48:50
问题 I was trying to use the containerless statements like <!--ko if:IsShowData==true --> of knockoutjs in hot towel template but it was not woring instead if i use visible binding with some element like div then it work very fine.( <div data-bind="visible: IsShowData==true"></div> ) Can anybody tell me if containerless statements of knockoutjs doesnt work in hot towel template? In Default Hot towel template i added few lines in home.html and home.js as follow: views/home.html <section> <h2 class=

durandal : best way to pass data between ViewModels

假如想象 提交于 2019-12-10 17:15:52
问题 Durandal: What is the correct way to pass data (parameters) between Viewmodels if possible (without dealing with the backend ). let say i have 2 views overview and details i want that went the user klick on a list element from overview it takes the id of that element and pass it to details Viewmodel so that i can start working with that id. thank you for the help 回答1: Hint: you probably want the route-driven approach. The other one is for the sake of completeness. Viewmodel-driven approach In

HotTowel Durandal Inject different views based on the user

风格不统一 提交于 2019-12-08 07:44:20
问题 In the shell.html for HotTowel template we have: <!--ko compose: {model: router.activeItem, afterCompose: router.afterCompose, transition: 'entrance'} --> <!--/ko--> which will automatically insert the proper view by convention. I am trying to inject different views based on the user's role in a HotTowel/Durandal App. For example, I have two Views, productEditor_Admin.html productEditor_Superviser.html (instead of these two views, I used to have only productEditor.html, by convention