Setup for DevelopmentSend feedback
Setting up a new Angular project is quick and easy, using everyday Dart tools.
Prerequisites: Dart SDK & Dartium
If you don't already have the Dart SDK and Dartium, get them. We recommend using the WebStorm IDE, as well.
Get Started tells you how to get the tools.
Creating a project in WebStorm
Using WebStorm to create an app is simple, once you complete some one-time setup.
- Launch WebStorm.
- If you haven't already done so, configure Dart support in WebStorm.
- Choose Create New Project from the welcome screen, or File > New > Project... from the menu. A dialog appears.
- Select Dart from the list on the left.
- Set the location and template:
- In the Location input field, check that the project folder is where you want it.
- Also in the Location field,
change the name of the project from
untitledto whatever you choose, such as
- Make sure that Generate sample content is checked.
- Select Angular QuickStart Example from the list.
The form should look similar to the following:
- Click Create.
WebStorm takes several seconds to analyze the sources and do other housekeeping. This only happens once. After that, you'll be able to use WebStorm for the usual IDE tasks, including running the app.
For more information on using WebStorm, see Installing and Using WebStorm.
Using a template from the command line
Stagehand gives you
command-line access to the same templates that WebStorm uses.
Assuming the Dart SDK and
are in your path, here's how you use Stagehand to create an Angular project.
- Install or update stagehand:
pub global activate stagehand
- Create a directory for your project:
mkdir angular_quickstart; cd angular_quickstart
- Use Stagehand with the appropriate template to create a skeleton app:
Note: Examples in this guide and tutorial are based on the QuickStart example, which is in the
web-angular-quickstarttemplate. A more general-purpose template is
- Get the app's dependencies:
- Run the app:
What's in the QuickStart example?
These files are organized as follows:
All guides and cookbooks have at least these core files. Each file has a distinct purpose and evolves independently as the application grows.
Bootstraps the application to run in the browser.
A set of styles used throughout the app.
The file that describes this Dart package (the app) and its dependencies. For example, it specifies the angular2 and browser packages as dependencies, as well as the angular2 transformer.
If you're new to Angular, we recommend staying on the learning path.