Skip to content

Commit

Permalink
Updates component.md
Browse files Browse the repository at this point in the history
Auto commit by GitBook Editor
  • Loading branch information
shmool committed Mar 27, 2017
1 parent 33e3f74 commit b0ffc94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion component.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class AppComponent {

It has one member called "title". It is a variable to which you can assign a value. The value assigned to it here is the string "todo works!".

Angular takes care of synchronizing the members of the component with the component template. So we can easily use the member `title` in the template. Take a look at the file `app.component.html` - this is the template attached to the component:
Angular takes care of synchronizing the members of the component with the component template. So we can easily use the member `title` in the template. Take a look at the template attached to the component in the :

```html
<h1>
Expand Down Expand Up @@ -115,6 +115,7 @@ template: `
It is easier to manage the template when you see its controller at the same time. This is true as long as the template doesn't get too long and the controller doesn't get too complicated. If they do, it's a sign you should refactor your code by breaking it down to child components.

At this point you can delete the file `app.component.html`.
>When generating a new project, you can state that you'd like an inline template for the root component by adding the flag `-it` (or `--inline-template`). Keep this in mind on your next project!
The same way we use inline template, we can use also inline styles. But for now we will keep the styles in a separate file.

Expand Down
4 changes: 2 additions & 2 deletions installations.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ cd the-path-to-your-folder/myProjects

Now, create a new project, called _todo-list_ inside the projects folder, using Angular-CLI, by running the following command:
```
ng new todo-list --prefix todo
ng new todo-list --prefix=todo
```
This can take a while, since many packages are being downloaded and installed.
The prefix will be used in every component we create. The default prefix is 'app'.
The prefix 'todo' will be used in every component we create. The default prefix is 'app'.


Now enter the new folder that Angular-CLI created for this project
Expand Down

0 comments on commit b0ffc94

Please sign in to comment.