Top 12 Productivity Tips for WebStorm and Angular – Part 1

This article was sponsored by JetBrains. Thank you for supporting the partners who make SitePoint possible.
In this 2-part series, Google Developer Experts Jurgen Van de Moere and Todd Motto share their favorite productivity tips for developing Angular applications using WebStorm.
In this first part, Jurgen shares his personal top 5 WebStorm features that allow him to increase his productivity on a daily basis:

Use Angular CLI from within WebStorm
Navigate like a pro
Take advantage of Angular Language Service
Auto format your code
Optimize your imports

Each tip can tremendously increase your development productivity, so let’s dig into them a little deeper one by one.
Tip 1: Use Angular CLI from Within WebStorm
Angular CLI is a Command Line Interface (CLI), written and maintained by the Angular team, to help automate your development workflow. You can use it to quickly create new Angular projects and add new features such as components, services and directives to existing Angular projects.
WebStorm’s integration with Angular CLI provides you with all its power right from within WebStorm, without using the terminal.
To create a new Angular Project, choose File | New | Project and select Angular CLI.
Enter a project location and hit the Create button. WebStorm uses Angular CLI to create a new Angular project and install dependencies.
When your new Angular application is in place, you can easily add new Angular features. Right click on src/app and choose New | Angular CLI to pick the type of feature you wish to add.
Once you’ve selected a feature, you can specify the name and optional parameters, just as you would with Angular CLI on the command line:

To learn more about Angular CLI options and parameters, make sure to check out The Ultimate Angular CLI Reference.

What’s really awesome is that WebStorm automatically adds the component to the right Angular module for you, in this case AppModule.
If your application has multiple Angular modules, right click on the module you wish to add the feature to and choose New | Angular CLI. WebStorm will make sure the new files are created in the right location and that the new feature is added to the correct Angular module.
How sweet is that!
Tip 2: Navigate Like a Pro
Use cmd-click or cmd-B to easily jump to any definition within your project.
If you are a keyboard user, just put your cursor on a term and hit cmd-B. If you are a mouse user, hold down the cmd button and all terms you hover will turn into links to their definition.
WebStorm automatically recognizes Angular components and directives in your HTML, links to stylesheets, links to templates, classes, interfaces and much more.
No need to open file(s) manually, just jump to any definition you need:

When looking for a file that you don’t have an immediate reference to, hit shift twice to open the Search everywhere dialog. You don’t have to type the entire search string. If you want to open AppComponent, just type the first letter of each part — i.e. ac — and WebStorm will immediately narrow down the result list for you, so you can quickly pick the suggestion you wish to open:

Another super useful navigation shortcut is cmd-E, which presents you with a list of recently edited files so you can easily navigate back and forth between them.

Knowing how to quickly navigate to the code you need will save you a tremendous amount of time every single day.
Tip 3: Take Advantage of Angular Language Service
Angular Language Service is a service, designed by the Angular Team, to provide IDEs with error checking and type completion within Angular templates.
WebStorm integrates with Angular Language Service to better understand your code. To enable Angular Language Service, first make sure it is installed:
npm install @angular/language-service –save-dev

If you use Angular CLI to generate an Angular application, Angular Language Service is automatically installed.

Next, go to Preferences | Languages & Frameworks | TypeScript, make sure Use TypeScript Service is checked and click Configure…:

The Service Options modal will pop up. Enable Use Angular service and apply the changes:

By default, WebStorm already provides great assistance for writing Angular code.
When editing a script, WebStorm automatically imports the required JavaScript modules so you don’t have to import them manually.
If you open up the TypeScript panel, WebStorm provides you with immediate feedback on the validity of your code, so you can quickly resolve issues before having to compile your project.
Watch how the OnInit interface is automatically imported and how the live TypeScript feedback immediately tells you whether or not your TypeScript code is valid:

When you edit a template, WebStorm provides you with smart code completion that recognizes components, directives and even input and output properties:

With Angular Language Service enabled, WebStorm is able to improve code completion in template expressions:

… and report template errors more precisely right inside your editor:

Catching errors without having to compile your project saves you incredible amounts of time.
Tip 4: Auto-format Your Code
Don’t worry about formatting your code manually. WebStorm has you covered.
Whether your are in a template, a script, a stylesheet or even a JSON file, just hit cmd-option-L and WebStorm will automatically format all code for you:
Continue reading %Top 12 Productivity Tips for WebStorm and Angular – Part 1%


Sponsor: Media Temple

(This is a sponsored post.)
Media Temple is my web host here at CSS-Tricks. I still remember what it was like buying my first web hosting, pointing a domain name to it, FTPing into that server, and having the files I put there appear in the web browser. Powerful stuff, kids. Watch out or you might try to turn it into a career!
I’ve upgraded my server a few times since then, but it’s still a pretty standard grade …

Sponsor: Media Temple is a post from CSS-Tricks



(This is a sponsored post.)
When asked “Why Wufoo?" they say:
Because you’re busy and want your form up and running yesterday.
Wufoo is a form builder that not only makes it fast and easy to build a form so you really can get it up and running in just minutes, but also has all the power you need. What makes forms hard are things like preventing spam, adding logic, making them mobile friendly, and integrating what you collect …

Wufoo is a post from CSS-Tricks


How to Set Up Airbrake Error Monitoring for Your JavaScript App

This article was sponsored by Airbrake. Thank you for supporting the partners who make SitePoint possible.
We’re all very careful about testing our code before putting it out into a production environment, right? We use test-driven development or build out elegant suites of unit tests, functional tests, and integration tests. We run our products through all the likely environments where it may be deployed repeatedly every time we make a change to our code. We test every possible path a user could follow on every conceivable browser.
Well, ok, none of us is perfect. But at least our users are always diligent about reporting every error they encounter, and providing detailed information about exactly how to reproduce those errors so they’re easy to track down and fix.
Yeah, I didn’t think so.
Error Monitoring to the Rescue!
Thankfully there are services out there to help us diagnose and resolve issues that may have slipped through the infinitesimal cracks in our diligent quality testing procedures.
I’m talking about remote error monitoring services. If you haven’t heard of them before, remote error monitoring services can track and report on actual errors that users encounter in real time as they happen, before the user even has a chance to file a vague or misleading bug report.
In addition, they can provide you with a range of useful details about how the error came about: what browser version the user was running, what account was logged in, what operating system was being used, any session data, a backtrace of the error itself, as well as any custom tags you might have inserted into your code to help identify issues.
Getting Started With Error Monitoring
There are a number of services and options in the market, but a good comprehensive one is They’ve been around for a long time in internet years, so you may remember them as Hoptoad back before they changed their name in 2011.
Airbrake also supports a very broad range of back-end and front end languages and environments from Ruby and PHP to .NET and Node.js. They also offer native integration with most of the popular code management and deployment services such as GitHib, JIRA, Bitbucket, and Slack. It’s likely that whatever you’re working with, they have the tools you need to get started quickly and easily. Their reporting interface is also clean and easy to navigate, so you can start generating actionable information from your deployed production code quickly.
Implementing the code into your product is straightforward. To get started, you can create an account at that’s free for the first 14 days while you kick the tires, with no credit card required during the trial period.
When you create your first project, you’ll be provided with a range of options with pre-written integration code in over 20 languages. As an example, let’s say we want to use JavaScript end-to-end, and have an Express based Node.js api service on the back end.
Monitoring an Express App
Let’s set up a quick example to show how easy integrating error monitoring with Airbrake can be. Assuming we already have node installed, in the terminal we can create a simple Express app to monitor using the Express Generator, which we can install with yarn or npm:
yarn global add express-generator

We can then run it to create a bare-bones Express app:
Continue reading %How to Set Up Airbrake Error Monitoring for Your JavaScript App%


Get instant feedback from visitors

(This is a sponsored post.)
Now you can get instant visual feedback for your website or app. Incoming Feedback from Hotjar is an easy and quick way to collect instant feedback directly from your website visitors.
Measure your performance and see the impact your team’s changes have on your website or app over time. Celebrate your wins and tackle your team’s next challenge.
It only takes your visitors two clicks to share their feedback on your website or app. …

Get instant feedback from visitors is a post from CSS-Tricks


Top Prototyping Tools You Should Consider Using (Sponsored)

Knowledgeable designers constantly check with clients and other team members for feedback. Also, they always seek assurances their design is moving in the right direction. Prototypes offer one effective way of sharing design information with others. They also serve as a self-check. They make detection and subsequent elimination of design errors less difficult. High-fidelity prototypes […]
The post Top Prototyping Tools You Should Consider Using (Sponsored) appeared first on David Walsh Blog.


​HelloSign API: The dev friendly esign

(This is a sponsored post.)
We know that no API can write your code for you (unfortunately), but ours comes close. With in-depth documentation, customizable features, and dashboard that makes your code easy to debug, you won’t find an eSignature product with an easier path to implementation. 2x faster than other esignature APIs.
“We wanted an API built by a team that valued user experience as much as we do. At the end of the day, we chose HelloSign …

​HelloSign API: The dev friendly esign is a post from CSS-Tricks


The Advantages of Using a Design to WordPress Service and Four Great Options (Sponsored)

You’ve taken a cool idea and transformed it into an awesome design that’s ready to take the world by storm. However, there is one thing that is left to do – converting it to code. You could, of course, take the easy route and use a tool that will do the conversion automatically. This would […]
The post The Advantages of Using a Design to WordPress Service and Four Great Options (Sponsored) appeared first on David Walsh Blog.