Blog post example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Jobney.Casm.Web.Models.ManageDataBootstrapper | |
<script> | |
(function () { | |
'use strict'; | |
var app = angular.module('Jobney.Casm.ManageApp', [ | |
'ui.router', | |
'ui.bootstrap', | |
'Jobney.Casm.SharedServices' | |
]); | |
app.factory('BootstrappedData', [function() { | |
var service = {}; | |
service.pilots = @Html.Raw(Model.Pilots); | |
service.passengers = @Html.Raw(Model.Passengers); | |
service.airplanes = @Html.Raw(Model.Airplanes); | |
service.settings = @Html.Raw(Model.Settings); | |
return service; | |
}]); | |
})(); | |
</script> | |
@Scripts.Render("~/bundles/ng-manage-app") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Optimization; | |
namespace Jobney.App.Web | |
{ | |
public class BundleConfig | |
{ | |
public static void RegisterBundles(BundleCollection bundles) | |
{ | |
bundles.Add(new ScriptBundle("~/bundles/js-base").Include( | |
"~/Scripts/libs/jquery-{version}.js", | |
"~/Scripts/libs/bootstrap.js", | |
"~/Scripts/libs/select2.js", | |
"~/Scripts/libs/bootstrap-datepicker.js", | |
"~/Scripts/libs/respond.js", | |
"~/Scripts/libs/lodash.js", | |
"~/Scripts/endless.js" | |
)); | |
bundles.Add(new ScriptBundle("~/bundles/ng-base").Include( | |
"~/Scripts/libs/angular/angular.js", | |
"~/Scripts/libs/angular/ui-router.js", | |
"~/Scripts/libs/angular/ui-bootstrap-custom-0.9.0.js", | |
"~/Scripts/libs/angular/ui-bootstrap-custom-tpls-0.9.0.js", | |
"~/Scripts/libs/angular/angular-animate.js", | |
"~/Scripts/libs/angular/toaster.js" | |
)); | |
bundles.Add(new ScriptBundle("~/bundles/ng-shared-services") | |
.IncludeDirectory("~/Scripts/apps/shared/", "*.js")); | |
bundles.Add(new ScriptBundle("~/bundles/ng-manage-app") | |
.IncludeDirectory("~/Scripts/apps/manage/","*.js")); | |
bundles.Add(new ScriptBundle("~/bundles/ng-tripinfo-app") | |
.Include( | |
"~/Scripts/libs/jquery-ui.js", | |
"~/Scripts/libs/angular/sortable.js", | |
"~/Scripts/libs/angular/select2.js", | |
"~/Scripts/libs/angular/ngAutocomplete.js" | |
) | |
.IncludeDirectory("~/Scripts/apps/tripinfo/", "*.js")); | |
bundles.Add(new StyleBundle("~/Content/css/base").Include( | |
"~/Content/css/bootstrap.css", | |
"~/Content/css/datepicker3.css", | |
"~/Content/css/select2.css", | |
"~/Content/css/toaster.css", | |
"~/Content/css/select2-bootstrap.css", | |
"~/Content/css/font-awesome.css" | |
)); | |
bundles.Add(new StyleBundle("~/Content/css/custom").Include( | |
"~/Content/css/endless.css", | |
"~/Content/css/endless-skin.css", | |
"~/Content/css/site.css")); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Jobney.Casm.Web.Models.ManageDataBootstrapper | |
<div data-ng-app="Jobney.Casm.ManageApp" data-ng-controller="ManageAppCtrl"> | |
<ul class="tab-bar grey-tab"> | |
<!-- content here --> | |
</ul> | |
<div data-ui-view></div> | |
</div> | |
@section scripts | |
{ | |
<!-- Start ng-base --> | |
@Scripts.Render("~/bundles/ng-base") | |
<!-- Start ng-shared-services --> | |
@Html.Partial("_SharedServices") | |
<!-- Start ng-manage-app --> | |
@Html.Partial("_ManageAppSetup", Model) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@section scripts | |
{ | |
app.constant('RouteConfig', { | |
base: '@Url.Content("~/")', | |
project: { | |
all: '@Url.Action("All", "Project")', | |
details: '@Url.Action("Details", "Project")', | |
post: '@Url.Action("Post", "Project")' | |
}, | |
vendor: { | |
category: '@Url.Action("GetByCategory", "Vendor")', | |
details: '@Url.Action("GetById", "Vendor")', | |
getProductRating: '@Url.Action("GetByProduct", "Rating")' | |
}, | |
resolve: function (url) { | |
return this.base + url; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment