cassette

jquery selector does not work on element inside script tag using Cassette

ぃ、小莉子 提交于 2019-12-23 16:55:50
问题 When trying to access data-onload using $("#index").data("onload") I get back 'undefined' : <script type="text/html"> <section id="index" data-onload="app.load()"> <div data-bind="text:name"></div> </section> </script> Without the surrounding script tag everything works fine. This is loaded using Cassette which wraps it inside script tags. What am I doing wrong? 回答1: The contents of the script tag are not part of the DOM tree for your document. If you think about it, this makes sense, since

Minification is breaking my AngularJs code

倖福魔咒の 提交于 2019-12-19 01:46:08
问题 I'm using Cassette which uses the Microsoft Ajax Minifier to minify JS. This minifier renames variables, including variables that have special meaning to Angular, such as $scope and $http . So Cassette breaks my Angular code! How can I prevent this happening? For reference, this is the Angular code which is being broken. The $scope and $http function parameters are being renamed: // <reference path="vendor/angular.js" /> angular.module('account-module', []) .controller(

Cassette + Web Forms: This operation requires IIS integrated pipeline mode

寵の児 提交于 2019-12-13 04:51:00
问题 I have a working ASP.NET Web Forms application and after installing the Cassette.Aspnet NuGet package I got the following error on first run: This operation requires IIS integrated pipeline mode. What should I do? 回答1: If you are using Cassette 2, you need to add the following line to your web.config file: <cassette rewriteHtml="false" /> This will solve this issue, and also make the development web server happy. That solution was found on the following Github thread. 来源: https:/

Stop Cassette from minifying a JavaScript file

无人久伴 提交于 2019-12-11 03:33:11
问题 I'm using Cassette to minify my JavaScript. I don't want Cassette to minify one of my JavaScript files because it's causing an error. I'd rather use the already minified version provided by the original library authors. How can I add a JavaScript file to Cassette without it minifying the file? 回答1: You can use the following code for Cassette 1.x to create a IAssetTransformer that doesn't perform any minification public class NoMinification : IAssetTransformer { public NoMinification() {}