简体   繁体   中英

Reading HTML from source map

I'm trying to get both Typescript controllers and the connected html files from a IIS 7 database, but the code has been minimized and divided into .js and .js.min files.

Using chrome source, I've managed to find and use the reconstructed .ts files, but when I try to open the corresponding html files in chrome, they show up blank. I have found the html code I need in a templates.js file, but it's not formatted as html, but rather in a compressed form;

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

example of compressed html found in 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

Is there any way to reconstruct this html code to a usable form again?

I'm not very experienced in source mapping in javascript yet, if that wasn't abundantly clear.

Thanks.

Ok! I think I've got the file now. Like NJDawson said, all i needed to do was use an online unminifyer to show the template.js content.

I used http://unminify.com/ for anyone else stumbling over this thread. Haven't found out if the html works with my own code yet, but if it doesn't I'm pretty sure it's my fault, not the html code.

Thanks for the answers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM