modify Index.cshtml at /Views/Home/ folder See the insert:
The problem is: "var dataSource = upshot.dataSources.GetDeliveriesForToday" is not happy there is no intellisense for "dataSources" and "GetDeliveriesForToday", and dataSource.refresh(function (results) { alert(results); }); is not working, there
is no allert windows
@using DeliveryTracker.Controllers
@section featured {
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>Welcome to my Single Page Application</h1>
</hgroup>
</div>
</section>
}
@(Html.UpshotContext().DataSource<DataServicesController>(x => x.GetDeliveriesForToday()))
<script type="text/javascript">
$(function () {
var dataSource = upshot.dataSources.DeliveriesForToday;
dataSource.refresh(function (results) {
alert(results);
});
});
</script>
jsiahaan
Contributor
2318 Points
590 Posts
Re: Single Page Application - Prerequirement
Apr 02, 2012 02:00 PM|LINK
Hi,
I have tried to start over from the beginning again with the following steps:
@using DeliveryTracker.Controllers @section featured { <section class="featured"> <div class="content-wrapper"> <hgroup class="title"> <h1>Welcome to my Single Page Application</h1> </hgroup> </div> </section> } @(Html.UpshotContext().DataSource<DataServicesController>(x => x.GetDeliveriesForToday())) <script type="text/javascript"> $(function () { var dataSource = upshot.dataSources.DeliveriesForToday; dataSource.refresh(function (results) { alert(results); }); }); </script>Any one can help me please?
Indonesian Humanitarian Foundation