Make web-mode support HTML with AngularJS data-binding

  |   Source

I find it very useful to use `M-x imenu` to jump to the AngularJS binding point of one HTML file.

Insert below code into ~/.emacs:

(with-eval-after-load 'web-mode
  ;; angular imenu
  (add-to-list 'web-mode-imenu-regexp-list
               '(" \\(ng-[a-z]*\\)=\"\\([a-zA-Z0-9]*\\)" 1 2 "=")))
Comments powered by Disqus