| For the sake of this quickstart we recommend using the <code>es6-shim</code> GitHub repository for a faster start. The <code>es6-shim</code> repository includes all of the dependencies needed to write ES6 that compiles in the browser. Think of this repository as package rather than a new project. Clone the repository inside of aleady existing project.
| Create a new file named <code>app.es6</code>. The <code>.es6</code> extension signifies that the file uses ES6 syntax. Using the ES6 module syntax you can import the required modules from Angular2.
| The above import statement will import the three basic pieces needed to create an Angular app. The import statement loads the modules dynamically at runtime.
| Angular allows you to create custom HTML elements through components. Components are used to structure and represent the UI. This quickstart demonstrates the process of creating a <code>Component</code> with the HTML tag of <code>app</code>.
pre
code <hello></hello>
p A <code>Component</code> is made up of two parts; the annotation section and the component controller.
| sign. The <code>Component</code> annotation tells Angular what the HTML tag will be for your component. The tag is specified by using the <code>selector</code> property. The <code>selector</code> property is just a CSS selector.
p
| The <code>Template</code> annotations tells Angular what template to apply to your component. This component uses an inline template, but external templates are available as well. To use an external template specify a <code>url</code> property and give it the path to the template.
| The <code>Component</code> created above will have a HTML tag of <code><app></app></code> and a template of <code><h1>Hello {{ name }}</h1></code>.
| The component controller is defined using the ES6 <code>class</code> syntax. This <code>class</code> is the backing of the component's template.
pre
code
| class AppComponent {
| constructor() {
| this.name = "Alice";
| }
| }
p
| Templates read directly from their component controllers. Any properties or functions placed on the component controller can be directly accessed from the template.
| In the template above binds to a <code>name</code> property through the <code>{{ }}</code> syntax. In the component's constructor the name property is being set to Alice. When the template is rendered, Alice will appear instead of <code>{{ name }}</code>.
| Angular provides a <code>bootstrap</code> function that renders your component to the page. The <code>bootstrap</code> function takes a component as a parameter. Any child components inside of the parent component will be rendered as well.