从源映射中读取 HTML

Reading HTML from source map

我正在尝试从 IIS 7 数据库中获取 Typescript 控制器和连接的 html 文件,但代码已被最小化并分为 .js 和 .js.min 文件。

使用 chrome 源代码,我设法找到并使用了重建的 .ts 文件,但是当我尝试打开 chrome 中相应的 html 文件时,它们显示空白。 我在 templates.js 文件中找到了我需要的 html 代码,但它的格式不是 html,而是压缩格式;

$templateCache.put(" loooong line of html looking code.....");

压缩示例 html 在 templates.js

中找到

$templateCache.put("/Project.Dashboards.Instruments/Instruments/XYPlot/xYPlotEdit.html","<form role=form class=xyPlot-edit><div class=form-group><div class=row><div class=col-sm-4><div class=dashboards-propertypanel-navigation-container><abn-tree icon-leaf=icon-leaf icon-expand=\"glyphicon glyphicon-chevron-down\" icon-collapse=\"glyphicon glyphicon-chevron-up\" expand-level=1 tree-data=vm.configurationNodes tree-control=vm.tree data-on-select=vm.open(branch)></abn-tree></div>..... etc

有什么方法可以将此 html 代码重新构造为可用形式吗?

我在 javascript 的源映射方面还不是很有经验,如果不是很清楚的话。

谢谢。

好的!我想我现在已经拿到文件了。正如 N.J.Dawson 所说,我需要做的就是使用在线 unminifyer 来显示 template.js 内容。

我用 http://unminify.com/ 来表示其他人在这个线程上绊倒了。 还没有发现 html 是否适用于我自己的代码,但如果不能,我很确定这是我的错,而不是 html 代码。

感谢您的回答!