-
dejobo
asp.net-mvc knockout.js single-page-application durandal hottowel
I am using the upgraded version of Hot Towel template which has new versions of Durandal, Knockout, Breeze, etc. for a Single Page Application. This process works fine with the older version but not the newest.This is the error I get:Unhandled exception at line 93, column 13 in [http://servername:50921/Scripts/durandal/viewEngine.js]0x800a138f – Microsoft JScript runtime error: Unable to get value of the property ‘length’: object is null or undefinedI have changed the convention for the viewLoca
-
CodeNoob
asp.net-mvc-4 breeze single-page-application
I have just started learning SPA apps and I am having issues running it on IE8. I am using mvc4 and EF. The app is built using durandal.I am using jquery 1.10 because jquery 2 does not work on IE 8.Basically the error im getting is’Unhandled exception at line 786, column 9 in http://localserver/scripts/breeze.debug.js0x800a01b6 – Microsoft JScript runtime error: Object doesn’t support this property or method’.The app runs fine on firefox and chrome.
-
TheVillageIdiot
durandal single-page-application durandal-navigation
I am trying to write a NopCommerce plugin. I have put in my app related files inside plugin’s root directory in app named directory. In my shell.js viewmodel I define routes as follows:define([‘durandal/system’, ‘durandal/plugins/router’, ‘service/logger’,’config’],function(system, router, logger,config) {var shell = {activate: activate,router: router};function activate() {logger.log(‘MyProducts Started’, null, system.getModuleId(shell), true);router.map([{ route: ”, moduleId: ‘viewmodels/myPro
-
Charles
javascript kendo-ui kendo-grid single-page-application
I have two routes defined in a SPA. Each of these routes has a grid declared in HTML.<div id=”grid-view”data-role=”grid”data-height=”700″data-selectable=”single”data-rowTemplate=”mn-grid-row”data-pageable=”true”data-pagesize=”5″data-columns='[ { “field”: “Request_ID”, “title”: “Request ID”,”width”: “325px”, “template”: kendo.template($(“#request-id-column”).html())}, <!–ETC–>></div>When I navigate from /route1 to /route2 the grid that is defined in /route2 seems to still be
-
Giri
knockout.js single-page-application
In my application I’m binding data from an API to a ul successfully. However, I’m unable to have KO call the function bound to the click event of an a tag. I got below error:Uncaught Error: Unable to parse bindings.Message: ReferenceError: loadContact is not defined;Bindings value: click: loadContact,attr: { title: 1} View code:<ul data-role=”listview” id=”ListSss” data-divider-theme=”b” data-inset=”true”><li data-role=”list-divider” role=”heading”>Criteria Selected</li><!–
-
Rohan Büchner
requirejs single-page-application durandal singlepage
I’ve tried to deploy my Durandal based solution. But I’m getting the following error once deployed.Uncaught ReferenceError: requirejs is not defined main.js:1 (anonymous function)I explored the files that got deployed with the projects, and require was included in the solution/path. The files have been deployed along with them. All that is different between the development and production copy is that my java script files get compressed. My next step is to see if this is related to the issue in a
-
K.Eriksson
asp.net-mvc-3 single-page-application
So I’m creating a asp.NET MVC3 application and want to apply single page application functionality to parts of the application. I think the easiest way to explain is with an example:The app consists of an admin area and a public area and is built using ordinary link-structure. I want to convert the admin area to an single page application reusing view and models from the existing application. Is it possible to do this and in that case how?
-
John Melvin III
javascript knockout.js single-page-application durandal dynamic-binding
I’ve been searching and I’ve found somewhat similar questions to mine, but none that quite match what I’m trying to do (or at least, the solutions have not worked for me). I’m really new to Durandal so I have little clue where to start to accomplish this. I’m working on a testing application and I have a div that is data-bound to display html like so:Data-bind on the View<div class=”active-document-text” id=”document-text” data-bind=”html: documentBody”>In the javascript for the view model
-
SB2055
knockout.js single-page-application
When I Add a card in my view, I call this: innerModel.addCard = function() {// This just adds a card to the UIvar card = new cardViewModel(addCardDto);innerModel.cards.push(card);}.bind(this);This adds an empty card to the UI and lets the user input some information. When they click “Save”, I send this bare-minimum package over the wire, save it serverside, and then return a fuller object. the same goes for Updating – I send only what’s needed, and get back a full object. Here’s my cardViewMo
-
amp
listview mvvm kendo-ui single-page-application
I’m testing the single page application (SPA) and MVVM features of Kendo UI, but I’m having some problems to bind a Viewmodel to a listview which is the content of on of the pages…What I have so far is:<div id=”app”><button data-bind=”click: gotopage1″>Page 1</button><button data-bind=”click: gotopage2″>Page 2</button><button data-bind=”click: gotopage3″>Page 3</button> </div><script id=”page1″ type=”text/x-kendo-template”><ul id=”listVi
-
ccorrin
javascript entity-framework breeze single-page-application
I have three breeze entities, my application is a long form that adds records to all three tables at once before going to the server for a save. Two of the tables Drivers & Vehicles have a relationship to AutoLead and need the AutoLeadId from the AutoLead table that is being entered all at once on the client side.So I have a form, the user entered information into AutoLead, then adds records into the Drivers and Vehicles tables in one seamless form. How do I get the Id to assign to Drivers a
-
1ManStartup
backbone.js backbone.marionette single-page-application
Edited This BelowIn this image below I have two main regions.One for the user list on the left: allusersRegionAnd another for the the right side where a layout is displayed, which contains unique attributes to the user that was clicked in the allusersRegion and a list of articles by the user: middleCoreRegion**If you noticed the middleCoreRegion is showing all articles by all users..This is wrong and I am trying to show all articles of the individual user (in this case. “kev”)I tried to see if
-
RobVious
javascript knockout.js single-page-application durandal
Following this guide: http://www.knockmeout.net/2012/05/using-ko-native-pubsub.htmlI’ve attempted to implement pub/sub functionality in a Durandal application. The structure of a durandal app gives me a shell.js model, which consumes other viewModels, such as “home.js”. In shell.js, I have the following code: var postbox = new ko.subscribable();ko.subscribable.fn.publishOn = function (topic) {this.subscribe(function (newValue) {postbox.notifySubscribers(newValue, topic);});return this; //suppo
-
Charles
jquery angularjs single-page-application
I can’t seem to figure out why the orderBy filter isn’t working on $complie elements.i am modifying element at the run time after that i am using $compile service to manually compile the modified element in order to work angular directive properly,but i have notice one things after applying $compile service my order by filter is not working properly.<table class=”gridTable” id=”serviceContractTable” flexicolumns=”srcCustomer.ServiceContracts:500″ pagesize=”10″><thead><tr class=
-
RobVious
javascript knockout.js single-page-application durandal
What I HaveTrying 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 routingrouter.useConvention();router.mapRoute(‘home’, ‘viewmodels/home’, ‘Test App’
-
qhaut
knockout.js requirejs single-page-application durandal knockout-validation
I am not able to get knockout.validation up and running with durandal. knockout itself is working fine. If anyone got this straight I would be thankful for posting the configuration. // main.js require.config({paths: {“libs”: “../scripts”,”knockout”: “../scripts/knockout-2.2.1”,’knockout.validation’: ‘../scripts/knockout.validation’ }, shim: {‘knockout.validation’: {deps: [“knockout”]} } });define(function (require) { validation = require(‘libs/knockout.validation’) // other dependencies are omi
-
Sven
php javascript single-page-application
I am developing a javascript module, which adds a lot of functionality to a complex page. Data binding is done with php. I am putting my js files to the end of my page, as recommended by html5boilerplateHow do I pass data from the server into my js module? The only thing I can think of is: storing the data in some DOM variable and then reading it from the JS file. Like so:PHP:<script type=”text/javascript”>var saveMethodUrl = ‘<?php echo $this->getUrl(“page/save”) ?>’;</scrip
-
Hao Kung
asp.net breeze single-page-application bundling-and-minification asp.net-optimization
I have been using Single Page Apps JumpStart on PluralSight developing a new app with all these new JavaScript libraries.I keep running into this reoccurring issue where in each chapter I add the new scripts that I need as part of the bundle. In this instance it is Q and breeze. But for some reason when I debug my application and I go to the network tab of my browser, they are not retrieved. Because of this breeze.EntityQuery is undefined in my datacontext.js, giving me a JavaScript error.When i
-
raman
-
Ben Ripley
javascript html5 single-page-application durandal hottowel
I’m using the Hot Towel SPA project I’m trying to call a simple js function when a view is activated. What I’m seeing is that the item does not seem to be loaded when the activate function is called.I’ve also tried putting the code in an initialize function called by activate as suggested on other SO posts. This does not seem to help.So what is the recommended method in Durandal/HotTowel for calling a function on view load?home.js (view model)define([‘services/logger’], function (logger) {var vm
-
gerrod
javascript single-page-application durandal
I’m trying to work out where the best place to run a long-running load operation is using Durandal.From what I can tell, the general recommendation for loading data is in the ViewModel’s activate method, which is what I usually do – something like:viewModel.activate = function () {var loadPromise = myService.loadData();return $.when(loadPromise).then(function (loadedData) {viewModel.data(data);}); };I know that if I don’t return the promise here, then there’s usually problems with the bindings –
-
Jonathan Sullivan
backbone.js requirejs single-page-application
I have been staring at this for a while and can’t seem to figure out why some modules don’t load when setting them as dependencies. I have a custom module called ‘models’ it is a bundle configured in my mvc project. ‘/scripts/models.js’ is the virtual path. When I define it in require.config and as a dependency it loads the file. I can see it was requested and found. No errors from require. However, when I try to use the name I give it as a parameter to my router, it is undefined (models.userMod
-
suamikim
javascript requirejs single-page-application durandal singlepage
I have 2 models which are cross referencing each other. This could look like this:MainModel:define([ ‘durandal/app’, ‘durandal/plugins/router’, ‘models/Shell’, ‘models/EditModel’ ],function (app, router, shell, editModel) {//…return {//…// This function should be accessible by the EditModel update: function() {//…},showEditView: function() {// Initialise the EditModel with some data and show the according view afterwardseditModel.init(‘set some important stuff here…’);router.navigateTo(‘
-
SB2055
mvvm requirejs single-page-application durandal
Throughout my app I have references to a singleton AMD called hub.js – defined as follows: // hub.js define([‘services/dataservice’], function (dataservice) { // list of properties // dataservice === undefined – why? }I reference this from other vms by including it like this: define([‘durandal/app’, ‘services/dataservice’, ‘durandal/plugins/router’, ‘services/hub’ ], function (app, dataservice, router, hub) {But I need access to my dataservice from my hub, as you can see in the first snippet. R