AngularJS, strange indenting issue.

Hi,

I'm testing developing angular in PhpStorm, I usually use Sublime.

I'm getting some strange indentation and not sure why, I have tried changing some of the properties in the Code Style settings.

Test JS:

angular.module( 'mwApp', [
    'templates-app',
    'ui.router',
    'ngResource
    // A new line here works.
])
    
.run(['$rootScope', function($rootScope) {
          // A new line starts here, indenting 2 times.
}])

.controller('AppController', ['$scope', function($scope) {
     // I want new lines to start to start here.
}])

;


When starting a new line in a function above PhpStorm is indenting 2 times.

Why is it doing this, how do i make it stop?

1 comment
Comment actions Permalink

Do you have "Align when multiline" enabled under Settings|Code Style|JavaScript|Wrapping and Braces|Function call? see https://youtrack.jetbrains.com/issue/WEB-7601

0

Please sign in to leave a comment.