我正在使用Webstorm 2016.1,并试图配置John (https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y252)中的模板,我到底在哪里复制模板xml文件?如何在网络风暴中激活/使用它们?
发布于 2016-03-22 14:54:47
经过一番研究,我找到了一种方法。在Mac上执行以下操作:
测试:在JavaScript文件中,键入ngcontroller,然后是Tab键。您应该看到以下内容:
(function () {
'use strict';
angular
.module('moduleName')
.controller('ControllerName', ControllerName);
ControllerName.$inject = ['dependency'];
/* @ngInject */
function ControllerName(dependency) {
var vm = this;
vm.title = 'ControllerName';
activate();
////////////////
function activate() {
code
}
}
})();发布于 2016-07-15 12:06:43
需要注意的一点是,当复制上面的模板时,“模板”文件夹不存在。您需要像上面的答案中提到的那样创建它。将xml放到fileTemplates文件夹中将使不起作用,而不是。
https://stackoverflow.com/questions/36155277
复制相似问题