Skip to content

A library for bundling angularjs partials/templates and pushing them to the $templateCache

Notifications You must be signed in to change notification settings

freein/AngularPartialsBundles

 
 

Repository files navigation

AngularPartialsBundles

A library for bundeling angularjs partials/templates and pushing them to the $templateCache

Add an AngularPartialsTransform to your templates bundle:

var angularTemplatesTransform = new AngularPartialsTransform("angularPartialsBundles");
bundles.Add(new Bundle("~/bundles/partials", angularTemplatesTransform)
    .IncludeDirectory("~/app/partials/", "*.html", true)
    );

The templates can be rendered by using AngularPartials.Render:

 @Scripts.Render("~/bundles/lib")
 ...
 @AngularPartials.Render("~/bundles/partials")

Or conditional with Scripts.Render:

@if (BundleTable.EnableOptimizations)
{
    @Scripts.Render("~/bundles/partials");
}

About

A library for bundling angularjs partials/templates and pushing them to the $templateCache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 88.7%
  • JavaScript 9.4%
  • Other 1.9%