now is working after I add the said script on your reply, This should be work, using the new bundling feature, but the fact is the bundling has not perfectly work yet.
This is the bundling at at _Layout.cshtml (I am not using _SpaLayout.cshtml because, I am using Home/Index,cshtml with _Layout.cshtml.
jsiahaan
Contributor
2304 Points
588 Posts
Re: Single Page Application - Prerequirement
Apr 07, 2012 09:32 AM|LINK
Hi Kristof,
now is working after I add the said script on your reply, This should be work, using the new bundling feature, but the fact is the bundling has not perfectly work yet.
This is the bundling at at _Layout.cshtml (I am not using _SpaLayout.cshtml because, I am using Home/Index,cshtml with _Layout.cshtml.
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" /> <link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/themes/base/css")" rel="stylesheet" type="text/css" /> <script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Scripts/js")"></script>Here my my modification and work as I expect. There are two scrpits I commented because I do not have that two.
@using DeliveryTracker.Controllers @* I did not put this here since bundling already define on _Layout.cshtml *@ <script src="~/Scripts/jquery-1.6.4.js" type="text/javascript"></script> <script src="~/Scripts/modernizr-2.0.6-development-only.js" type="text/javascript"></script> <script src="~/Scripts/knockout.debug.js" type="text/javascript"></script> <script src="~/Scripts/upshot.js" type="text/javascript"></script> <script src="~/Scripts/upshot.compat.knockout.js" type="text/javascript"></script> <script src="~/Scripts/upshot.knockout.extensions.js" type="text/javascript"></script> <script src="~/Scripts/native.history.js" type="text/javascript"></script> <script src="~/Scripts/nav.js" type="text/javascript"></script> @*<script src="~/Scripts/amplify.js" type="text/javascript"></script>*@ @*<script src="~/Scripts/arrayUtils.js" type="text/javascript"></script>*@ @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()))*@ @(Html.UpshotContext().DataSource<DataServicesController>(x => x.GetDeliveriesForToday())) <script type="text/javascript"> $(function () { var dataSource = upshot.dataSources.DeliveriesForToday; dataSource.refresh(function (results) { alert(results); }); }); </script>I am very happy now it's working. I can continue my exercise, and thanks you very much
Indonesian Humanitarian Foundation
jsiahaan
Contributor
2304 Points
588 Posts
Re: Single Page Application - Prerequirement
Apr 07, 2012 09:46 AM|LINK
I am going to try your demo right away.
Again thank you so much
Indonesian Humanitarian Foundation