Mastering Angular Components
上QQ阅读APP看书,第一时间看更新

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Let's change the view encapsulation of our main component to use the ViewEncapsulation.None mode."

A block of code is set as follows:

import {Component, ViewEncapsulation} from '@angular/core';

@Component({
selector: 'mac-root',
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
title = 'mac';
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

...
import {TaskService} from './tasks/task.service';
...
@NgModule({
...
providers: [TaskService],
...
})
export class AppModule {
}

Sometimes, on large code excerpts that require you to implement code changes in existing code files, we use the following format:

  • New or replaced code parts are marked in bold
  • Already existing and irrelevant code parts are hidden using an ellipsis character

Any command-line input or output is written as follows:

ng new mastering-angular-components --prefix=mac

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "You should be able to see the generated application app with a welcome message saying Welcome to mac!"

Warnings or important notes appear like this.
Tips and tricks appear like this.