将选择导出到 WebStorm 10 中的新文件?
Export selection to a new file in WebStorm 10?
在我的 app.js
文件中,我有以下代码:
myApp.directive("inventoryProduct", function ()
{
return {
restrict: "E",
scope : {
name : "@",
price: "@",
onReport:"&"
},
template: "<div><b>{{name}} costs {{ price}}$</b></div>\n<div>\n <button class=\"btn btn-lg btn-danger\" ng-click=\"onReport({IDontKnowA:name,IDontKnowB:price})\">Change name</button>\n</div>"
}
})
查看 template
的值,它是一个 HTML 字符串。
问题
假设我选择 html 字符串/任何字符串 —
Webstorm 中是否有任何选项可以:"Move selection to a new file" 并具有这个新文件名,以便现在文件将是:
myApp.directive("inventoryProduct", function ()
{
return {
restrict: "E",
scope : {
name : "@",
price: "@",
onReport:"&"
},
template: "newFile.js"
}
})
不,没有这样的重构。请随时在 youtrack 中创建对此功能的请求。相关工单:WEB-1232
在我的 app.js
文件中,我有以下代码:
myApp.directive("inventoryProduct", function ()
{
return {
restrict: "E",
scope : {
name : "@",
price: "@",
onReport:"&"
},
template: "<div><b>{{name}} costs {{ price}}$</b></div>\n<div>\n <button class=\"btn btn-lg btn-danger\" ng-click=\"onReport({IDontKnowA:name,IDontKnowB:price})\">Change name</button>\n</div>"
}
})
查看 template
的值,它是一个 HTML 字符串。
问题
假设我选择 html 字符串/任何字符串 —
Webstorm 中是否有任何选项可以:"Move selection to a new file" 并具有这个新文件名,以便现在文件将是:
myApp.directive("inventoryProduct", function ()
{
return {
restrict: "E",
scope : {
name : "@",
price: "@",
onReport:"&"
},
template: "newFile.js"
}
})
不,没有这样的重构。请随时在 youtrack 中创建对此功能的请求。相关工单:WEB-1232