Sublime Forum

[SOLVED] Sublime crashing with ng-template

#1

Hello. I’ve noticed that Sublime Text 3 (Build 3083) crash or the performance slows down if add the lines of code below:

<script type="text/ng-template" id="myModalContent.html">
        <div class="modal-header">
            <h3 class="modal-title">I'm a modal!</h3>
        </div>
        <div class="modal-body">
            <ul>
                <li ng-repeat="item in items">
                    <a ng-click="selected.item = item">{{ item }}</a>
                </li>
            </ul>
            Selected: <b>{{ selected.item }}</b>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" ng-click="ok()">OK</button>
            <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
        </div>
    </script>

Maybe the single quote is causing the issue. Idk.

Let me know if it’s on the roadmap of the next build. Thank you.

0 Likes

#2

Figure out the reason of crashing: Probably some package that validates HTML. I’ve removed the Sublime Text 3 folder (inside %APPDATA%), and start a fresh Sublime and it works like a charm. :mrgreen:

I don’t know the name of this package, but certainly it’s a HTML parser/syntax analyzer.

EDIT:

I’ve found the problem, was with JSHint Gutter, there is an issue open to fix it: github.com/victorporof/Sublime-JSHint/issues/98

0 Likes