gpt4 book ai didi

angularjs - John Papa angularjs 风格指南 webstorm 实时模板

转载 作者:行者123 更新时间:2023-12-05 01:36:30 27 4
gpt4 key购买 nike

我正在使用 Webstorm 2016.1 并尝试配置来自 John Papa (https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y252) 的模板我究竟在哪里复制模板 xml 文件?我如何在 Webstorm 中激活/使用它们?

最佳答案

经过一些研究,我找到了一种方法。在 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
}
}

})();

关于angularjs - John Papa angularjs 风格指南 webstorm 实时模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36155277/

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