Setup Sublime Text 3 for Angular 2

Here we share our Sublime Text setup for working with Angular 2.

TypeScript Package

Install TypeScript package:

  • Ctrl+Shift+P (open command palette)
  • Type install package then press Enter
  • Search for "TypeScript" then press Enter to install

Angular2 HTML Package

Install Angular2 HTML Syntax package:

  • Ctrl+Shift+P (open command palette)
  • Type install package then press Enter
  • Search for "Angular2 HTML Syntax" then press Enter to install

Automatically highlight .component.html files with Angular2 HTML Syntax:

  • Open a .component.html file
  • Choose View > Syntax > Angular2 HTML
  • Go to Preferences > Settings – Syntax Specific and add the following line (within the file on the right):

    "extensions":["component.html"]
  • Restart Sublime Text
  • xie

    help, in the sublime, how to smartly import an class when it use?

  • Michael McCoy

    Just a note that this syntax highlighter shows up as “Ngx HTML” in the View->Syntax menu not “Angular2Html”. Ref: https://github.com/princemaple/ngx-html-syntax

    • Stephen VoPava

      Thanks, Michael! Very helpful

Categories

Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow

Comments

Developed and designed by Netgloo
© 2019 Netgloo