gpt4 book ai didi

javascript - 从源映射中读取 HTML

转载 作者:行者123 更新时间:2023-12-03 06:08:01 26 4
gpt4 key购买 nike

我试图从 IIS 7 数据库获取 Typescript Controller 和连接的 html 文件,但代码已最小化并分为 .js 和 .js.min 文件。

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

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

templates.js 中找到的压缩 html 示例

$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 代码的错。

感谢您的解答!

关于javascript - 从源映射中读取 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39448854/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com