/// <summary> /// Creates AngularJs bundle from HTML templates. /// </summary> /// <param name="pipeline">The asset pipeline.</param> /// <param name="route">The route where the compiled .html file will be available from.</param> /// <param name="moduleSettings"></param> /// <param name="sourceFiles">The path to the .html source files to compile.</param> public static IAsset AddHtmlTemplateBundle(this IAssetPipeline pipeline, string route, AngularTemplateOptions moduleSettings, params string[] sourceFiles) { Guard.ArgumentIsNotNull(moduleSettings, "Can't be null"); return(pipeline.AddBundle(route, "text/javascript; charset=UTF-8", sourceFiles) .AdjustRelativePaths() .TransformHtml(moduleSettings)); }
/// <summary> /// Build a transformation with path and module name /// </summary> /// <param name="asset"></param> /// <param name="templateSettings"></param> /// <returns></returns> public static IAsset TransformHtml(this IAsset asset, AngularTemplateOptions templateSettings) { asset.Processors.Add(new Transformer(templateSettings)); return(asset); }