A simple ASP.NET MVC bundle that helps you combine all of your angular html templates into one file and add to your app's template cache.
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
wmwood.AngularTemplateBundler
.gitattributes
.gitignore
Angular-Template-Bundler.nuspec
LICENSE.md
README.md
wmwood.AngularTemplateBundler.sln

README.md

Angular Template Bundler

A simple ASP.NET MVC bundle that helps you combine all of your angular html templates into one file and add to your app's template cache.

Installation

PM> Install-Package Angular-Template-Bundler

see nuget

Usage

Add this line to your BundleConfig.cs:

bundles.Add(new AngularTemplateBundle("VIRTUAL_PATH", "ANGULAR_MODULE_NAME")
                       .IncludeDirectory("PATH_TO_APP_FOLDER", "SEARCH_PATTERN", SEARCH_SUBFOLDERS));

An example usage would be:

bundles.Add(new AngularTemplateBundle("~/bundles/app/templates", "myApp")
                       .IncludeDirectory("~/Assets/js/app", "*.tpl.html", true));

Then, add this line to your main razor page:

@Scripts.Render("~/bundles/app/templates")

License

see LICENSE.md