syllant / idea-plugin-xstructure

Plugin for Intellij IDEA which provides a flexible Structure view
9 stars 3 forks source link

Adding an ng-app tag to an element tag causes exception... #4

Open Zabeard opened 10 years ago

Zabeard commented 10 years ago

Problem shows up in WebStorm 8.0, WS-135.547, JRE 1.7.0_40 x86. Exception:

com.intellij.ide.structureView.newStructureView.StructureViewComponent.<init>(Lcom/intellij/openapi/fileEditor/FileEditor;Lcom/intellij/ide/structureView/StructureViewModel;Lcom/intellij/openapi/project/Project;)V:

Seems to have an issue with the angular js "ng-app" notation, if I omit it file no exception, solution works fine, all other files are okay structure view works file

This is the index.html used.

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body ng-app="myApp" ng-controller="myAppController as ws">

<p ng-repeat="person in ws.people">Hello World {{person.firstName + " " + person.lastName }}</p>

<script src="../bower_components/jQuery/dist/jquery.min.js"></script>
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../Scripts/app.js"></script>
</body>
</html>

This is the app.js

var myApp = angular.module('myApp', []);

myApp.controller("myAppController", function() {
    var ws = this;

    ws.people = [{firstName: "John", lastName:"Davidson"}]

});

This is the dependencies section from bower.json:

  "dependencies": {
    "angular": "1.2.15",
    "angular-ui-bootstrap": "~0.10.0",
    "d3": "~3.4.4",
    "jQuery": "2.1.0"
  },