durandal

Breeze.js - getting error trying to use “any” operator - error: Unable to get value of the property 'isAnonymous': object is null or undefined

北城以北 提交于 2019-12-07 18:23:36
问题 I am trying to use the "any" operator in Breeze to query a many table and I am getting the following error - TypeError: Unable to get value of the property 'isAnonymous': object is null or undefined The only stackoverflow question I can find that seems related is this one, but there is no solution to the isAnonymous issue because the poster did not provide more code: breeze projection : error selecting non scalar navigation properties I am using Breeze 1.4.11 with Entity Framework 5 The query

Front end javascript testing using Require and Resharper

浪子不回头ぞ 提交于 2019-12-07 15:54:28
So I've been trying to figure out how front end testing works (unit testing) but I am getting stuck on some point. So I have my jasmine test set up as follows: describe('Blabla', function () { it('returns true', function () { var people = require(["people"], function(ppl) { return ppl; }); expect(people.getTitle()).toBe('People piolmjage'); }); }); But running this gets me: TypeError: undefined is not a funtion So obviously, people is undefined. So perhaps my callback comes in too late. But if I remove the callback I get following error: it('returns true', function () { var people = require(

link to another controller with hot towel and durandal

*爱你&永不变心* 提交于 2019-12-07 12:10:52
问题 I am developing an mvc4 app with multiple spa's. I am using the hot towel template for my spa. What I want to do is have a anchor link within my views for a spa go to the index action for another controller, so my users can exit one spa and open another. Not all actions will start a spa some are regular mvc style pages. I have put code like like the following in my spa html pages: <a href="/controller/action">Navigate to another controller</a> This will change the url in the browser but

HotTowel Durandal Inject different views based on the user

依然范特西╮ 提交于 2019-12-07 12:01:23
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 everything worked) and only a single ViewModel: productEditor.js Now, I want to have a function in

Self-referencing many-to-many relationship EF code first

不羁的心 提交于 2019-12-07 11:17:17
问题 I work with ASP.NET MVC With Durandal/Breeze templates. Let's say I have the following class: public class Person { public int Id { get; set; } public string Firstname { get; set; } public string Lastname { get; set; } public virtual List<Person> Friends { get; set; } } With the following EF Fluent API: modelBuilder.Entity<Person>() .HasMany(m => m.Friends) .WithMany() .Map(m => m.ToTable("Friends")); The database is generated successfully. The problem is when I perform a que ry with Breeze

Chrome//kendoUI/jQuery: Maximum call stack size exceeded

笑着哭i 提交于 2019-12-07 11:14:39
问题 I am working hottowell template to create spa application and I am getting a nice error from jquery. Basically my problem start at the moment to try bind my view from viewModelBinder.js (from durandal library). viewModelBinder.beforeBind(obj, view); action(); viewModelBinder.afterBind(obj, view); at the moment to call beforeBind this code is executed (main.js of my own app) kendo.ns = "kendo-"; viewModelBinder.beforeBind = function (obj, view) { kendo.bind(view, obj.viewModel || obj); };

DurandalJS Routing Behavior

半城伤御伤魂 提交于 2019-12-07 10:04:07
问题 What I Have Trying to understand what's going on and how to control it. I have a "public" view for users that have not yet been authenticated, and a "home" view for users that are authenticated. Here's my route config: app.start().then(function() { //Replace 'viewmodels' in the moduleId with 'views' to locate the view. //Look for partial views in a 'views' folder in the root. viewLocator.useConvention(); //configure routing router.useConvention(); router.mapRoute('home', 'viewmodels/home',

Durandal 2.0 routing parameterized routes (same route different parameter)

天涯浪子 提交于 2019-12-07 07:39:58
问题 I am probably missing something basic, but when building navigation I am attempting to define multiple parameterized routes in the shell. The idea is that all of these routes will pass the user through to the same view/vm, but the parameter will determine content that is displayed after an ajax call). The routing itself works well, but the title is always passed through from the first route in the list. activate: function () { router.makeRelative({moduleId: 'viewmodels'}).map([ { route: 'grid

Durandal Custom View Location Strategy

痞子三分冷 提交于 2019-12-07 04:50:22
问题 I am trying to figure out how to use a custom view location strategy, I have read the documentation at this page http://durandaljs.com/documentation/Using-Composition/ but I don't exactly understand what the strategy function should look like. Can anybody give me a quick example of what the implementation of this function would be like and the promise that returns (even a simple one) etc? Thanks in advance, Gary p.s. This is the code in my html: <div> <div data-bind="compose: {model:

Estimated Time Between two Locations in iOS [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-06 15:13:40
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . What is proper way to get ETA (estimated time arrival) from AnyLocation to MyCurrentLocation? I want, when use tap on any annotation, then I have to set details on the Footer according to that annotation and user's current location. Please see below image for better understanding.