问题标签 [hottowel]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1366 浏览

requirejs - Hot Towel:为什么Durandal和Require在App文件夹而不是Script文件夹?

这是来自 Script 中的 3rd 方库的想法,以阻止开发人员自定义它们。这将鼓励他们编写扩展,以便更容易地接受任一库的新版本。

0 投票
1 回答
1088 浏览

knockout.js - 如何使用 Hot Towel 包含 text/html 脚本

我正在尝试熟悉 Hot Towel SPA 模板。在阅读了 Ryan Vanderpol 的这篇文章后,我想实现内联编辑。

现在,对于如何将“text/html”类型的脚本块插入到部分内容中,我感到很茫然。

这就是我在视图部分中的内容(注意里面的两个脚本块)。

这是我的视图模型。

当我运行该应用程序时,在 Chrome 中调试它时出现“找不到 ID 为 readTemplate 的模板”的错误消息。

如何在 Hot Towel 中实现我的 html 模板?

谢谢你的帮助。

0 投票
2 回答
3029 浏览

asp.net-mvc - Durandal and ASP.NET MVC conventions

I'm currently evaluating Durandal for use in an enterprise ASP.NET MVC application.

However the default conventions used by Durandal seem to conflict with the MVC conventions I've grown accustomed to.

The HotTowel MVC template by John Papa is great, but this too seems to "do away" with MVC conventions in favour of Durandals by putting things in an App folder.

A couple of the issues I have with these conventions are:

  • Views are potentially split across two locations (/App/views and /Views).
  • Scripts are also split across two locations (/App/durandal and /Scripts).
  • Views are not in the default MVC locations for the RazorViewEngine.

I would prefer to keep each element contained in the appropriate MVC conventions e.g.

My questions are:

  1. Is it possible to configure Durandal to achieve the above (or something similar)?

  2. Is it wise to venture away from the default Durandal conventions?

  3. What are the potential issues in doing so?

0 投票
1 回答
592 浏览

odata - Breeze.js 和 odata:类似 inlineCount 但没有过滤的东西?

在 Breeze.js inlineCount( http://www.breezejs.com/sites/all/apidocs/classes/EntityQuery.html#method_inlineCount ) 中实现了 odata inlinecount 参数 ( http://www.odata.org/documentation/uri-约定#InlinecountSystemQueryOption )

所以它显示过滤后的总计数但没有分页。

但是 Breeze 或 odata 中是否有一种“内联”方式也可以在不过滤单个微风查询的情况下获得完整计数?即在没有指定过滤的情况下将返回的所有记录的计数。我知道我可以为此做一个单独的查询,但希望有一种方法可以在一次操作中完成。

如果这是一个愚蠢的问题,请道歉;我仍在学习 odata 和 Breeze。我问的原因是我正在使用 datatables.net,它需要总计数、过滤计数和记录数,因此它可以显示类似

0 投票
1 回答
1594 浏览

asp.net - 使用 HotTowel(Durandal 框架)+ VS2012 翻译视图

我用 Durandal 和 Breeze 开发了一个 ASP.NET MVC 解决方案。我需要将前端翻译成法语和荷兰语。如何进行 Durandal/淘汰赛?

在经典的 ASP.NET MVC 解决方案中,我们有机会将视图呈现在服务器端(感谢 razor)。

谢谢你的帮助。

0 投票
1 回答
460 浏览

durandal - 如何自定义 Durandal 优化器?

如何自定义适用于名为 setup 而不是 main.js 的文件的 durandal 优化器,以及如何在 Web 应用程序中有多个 SPA 的情况下优化多个引导文件?

0 投票
1 回答
625 浏览

knockout.js - 使用 durandal 在我的标题中注入一些特定于当前视图的按钮

我使用Durandal 框架开发了一个 ASP.NET MVC 解决方案。

在 shell 页面上,我有侧栏(其中包含我的主菜单)和标题栏。此标题栏包含特定于当前视图的按钮。

例如,如果我显示一个搜索视图,我需要在标题栏中“注入”特定按钮,如“搜索”或“重置”按钮。

另一个例子,如果我显示一个详细视图,我需要在标题栏中“注入”特定按钮,如“保存”或“取消”按钮。

我的问题:如何继续能够在我的标题栏中为当前视图“注入”一些 html 元素(按钮)?

也许我需要重构我的外壳以在其他地方编码我的标题栏?

以下是我的 shell 页面的摘录:

0 投票
1 回答
2523 浏览

asp.net-mvc-4 - 如何使用带有 Hot Towel 角色的 Windows 身份验证?

我可以启动一个标准的 asp.net mvc 4 Intranet 项目并使用以下内容装饰控制器或方法:

我已经对其进行了测试,它可以完美运行(因为我的域帐户是 Active Directory 中“MyApp 用户”的成员)

但是我的问题/问题是如何为“热毛巾”应用程序获得相同类型的行为?我尝试装饰我的微风控制器、HotTowel 控制器或任何具有相同属性的方法,但我永远无法验证...什么给出了?

非常感谢您的帮助。

0 投票
1 回答
2333 浏览

durandal - 在 Durandal 中为某些视图使用不同的过渡

感谢 Durandal,我开发了一个 SPA。在这个模板中,我们可以定义从一个页面导航到另一个页面时使用的转换。过渡风格是在主模块中为所有人定义的,并用于所有过渡。

我想知道是否可以对某些特定视图使用不同的过渡?

任何想法?

谢谢。

0 投票
2 回答
1342 浏览

knockout.js - 在 hottowel SPA 默认视图模型中计算出可观察到的淘汰赛

我正在尝试按照 Hottowel SPA 模板中的视图模式创建一个简单的剔除计算 observable。最好的方法是什么?

我最初有这样的事情:

但这会导致错误,尽管我不是 100% 确定为什么

所以经过一些试验和错误,我得到了这个:

但我不确定这是一种非常漂亮的方法;我显然没有很好地理解 HotTowel 中用于视图模型的模块模式。所以我的问题是:

为什么我原来的方法不起作用?有没有比我的第二种方法更好或替代的方法来定义视图模型?