Skip to content

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.

License

Notifications You must be signed in to change notification settings

wmwood/Angular-Template-Bundler

Repository files navigation

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

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages