durandal

Durandal.js optimizer not working (empty main-built.js)

百般思念 提交于 2019-12-01 23:38:30
I'm trying to get Durandal.js optimizer working on my test project, but it seems to generate nothing to main-built.js. I use the following command from node.js command prompt, in durandal/amd folder: optimizer.exe --verbose true Result is Using default base configuration. Configuring for deploy with almond (custom). { "name": "durandal/amd/almond-custom", "inlineText": true, "stubModules": [ "durandal/amd/text" ], "paths": { "text": "durandal/amd/text" }, "baseUrl": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp", "mainConfigFile":

1 viewmodel multiple routes: lifecycle

混江龙づ霸主 提交于 2019-12-01 22:05:46
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 lifecycle. I'd like to be notified when the hash changes from one hash to another hash. For example

MVC Durandal app only works in server root url

我与影子孤独终老i 提交于 2019-12-01 21:22:01
When I create a project from the Visual Studio 2013 Durandal template and run the project, it serves a working instance of the Durandal Starter Kit web out of my development web server. When I deploy this to an IIS Web Application, it gets as far as the splash screen, and there it stalls. Fiddler reveals a 404 trying to GET /App/main.js HTTP/1.1 which clearly is the reason it stalls. This brings us to the question: presumably there are settings requiring attention, but what and where? This should be GET /c2/App/main.js HTTP/1.1 or possibly GET App/main.js HTTP/1.1 I don't know whether it

Inject kendo ui with requirejs

隐身守侯 提交于 2019-12-01 00:39:25
The documentation on kendo ui and requirejs seems to miss some stuff. They tell me how to use kendo.web.min which have everything included: http://www.kendoui.com/blogs/teamblog/posts/13-05-08/requirejs-fundamentals.aspx (search for keyword 'shim') but I am not interested in adding the big 2MB kendo.web.min script, I just want to shim the kendo.grid.min but this file has a dependency to kendo.data.min which again has a dependency to kendo.core.min. How can I tell requirejs to load also kendo.data.min and kendo.core.min before kendo.grid.min is loaded and after jquery has been loaded. I just

Durandal 2.0 custom dialog

耗尽温柔 提交于 2019-11-30 21:50:26
I wish to make a Durandal custom dialog that adds a window frame with title and footer around an existing composable viewmodel. I have made a customModal.html template <div class="messageBox"> <div class="modal-header"> <h3 data-bind="text: title"></h3> </div> <div class="modal-body"> <!--ko compose: { model: model, template: view }--> <!--/ko--> </div> <div class="modal-footer" data-bind="foreach: options"> <button class="btn" data-bind="click: function () { $parent.selectOption($data); }, text: $data, css: { 'btn-primary': $index() == 0, autofocus: $index() == 0 }"></button> </div> </div> As

Inject kendo ui with requirejs

☆樱花仙子☆ 提交于 2019-11-30 19:10:22
问题 The documentation on kendo ui and requirejs seems to miss some stuff. They tell me how to use kendo.web.min which have everything included: http://www.kendoui.com/blogs/teamblog/posts/13-05-08/requirejs-fundamentals.aspx (search for keyword 'shim') but I am not interested in adding the big 2MB kendo.web.min script, I just want to shim the kendo.grid.min but this file has a dependency to kendo.data.min which again has a dependency to kendo.core.min. How can I tell requirejs to load also kendo

How to generate typescript interfaces/definitions for breeze entities

杀马特。学长 韩版系。学妹 提交于 2019-11-30 18:55:42
问题 I’m new to SPA and I’m learning it with durandal and breeze. Recently I have switched my solution to Typescript and I’m wondering is there any good solution to generate typed breeze entities in TypeScript basing on EF model on the server. Only thing I have found is this post Breeze.js typed entities but this is only small piece of code and not even a real project. I’m wondering is there any better solution to this issue? 回答1: Below is a page you can drop in your site to generate typescript

Durandal Multiple Master Pages

馋奶兔 提交于 2019-11-30 16:57:13
问题 I am working on a SPA that I would like to use multiple master views. Here is my use case: I have a user that has a profile page. Within that profile page I would like to be able to display a couple of different views, ie. details, works, contact info, etc. I need to be able to deep link to each of these views. Each of these views must display the basic user data from the master layout view. It is my understanding that I should be using compose for this and I have a bit of code that seems to

Durandal: Showing a 'LOADING…' during composition

我只是一个虾纸丫 提交于 2019-11-30 13:21:29
问题 I can easily show a loading message while the activate method is doing its thing like so: <div data-bind="compose:ActiveVm"> <div class="text-center" style="margin : 75px"> <i class="fa fa-spinner fa-spin"></i> </div> </div> However if I then update my ActiveVm property with a different viewmodel, the splash content does not show. I understand that the splash content is only designed to show on 'initial' load, but what options do I have for displaying such a message when transitioning from

ValidateAntiForgeryToken with SPA architecture

∥☆過路亽.° 提交于 2019-11-30 10:52:06
问题 I am trying to set Register and Login for Hot Towel SPA applicantion. I have created SimpleMembershipFilters and ValidateHttpAntiForgeryTokenAttribute based on the asp.net single page application template. How do you get the @Html.AntiForgeryToken() code to work in the Durandal SPA pattern. Currently I have a register.html <section> <h2 data-bind="text: title"></h2> <label>Firstname:</label><input data-bind="value: firstName" type="text" /> <label>Lastname:</label><input data-bind="value: