使用Require时WebStorm将文件标记为无效
我正在使用最新版本的webstorm(9.03),我的大部分JavaScript文件显示为无效。我在下面展示代码使用Require时WebStorm将文件标记为无效,webstorm,Webstorm,我正在使用最新版本的webstorm(9.03),我的大部分JavaScript文件显示为无效。我在下面展示代码 'use strict'; function SpeakerDetailsController (speaker, CONFIG, $sce, $scope) { this.speaker = speaker; this.showSessions = CONFIG.showSessions === 'True'; $scop
'use strict';
function SpeakerDetailsController (speaker, CONFIG, $sce, $scope) {
this.speaker = speaker;
this.showSessions = CONFIG.showSessions === 'True';
$scope.someSafeContent = $sce.trustAsHtml("<i>Hello</i> <b>World!</b>");
}
SpeakerDetailsController.$inject = ['speaker', 'CONFIG', '$sce', '$scope'];
export default SpeakerDetailsController;
“严格使用”;
函数SpeakerDetailsController(扬声器、配置、$sce、$scope){
这个演讲者=演讲者;
this.showSessions=CONFIG.showSessions=='True';
$scope.someSafeContent=$sce.trustAsHtml(“你好,世界!”);
}
SpeakerDetailsController.$inject=['speaker','CONFIG','sce','$scope'];
导出默认SpeakerDetailsController;
请确保在Settings/Languages&Frameworks/JavaScript中将JavaScript语言版本设置为'ECMAScript 6'(或'JSX Harmony'),以正确识别ES6语法