Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 8554e38

Browse files
kapunahelewongwardbell
authored andcommitted
docs(doc-title-cookbook): apply guidelines (#3537)
1 parent 8f1acc5 commit 8554e38

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

public/docs/ts/latest/cookbook/set-document-title.jade

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ include ../_util-fns
22

33
a(id='top')
44
:marked
5-
Our app should be able to make the browser title bar say whatever we want it to say.
5+
Your app should be able to make the browser title bar say whatever you want it to say.
66
This cookbook explains how to do it.
77
:marked
8-
**See the <live-example name="cb-set-document-title"></live-example>**.
8+
See the <live-example name="cb-set-document-title"></live-example>.
99

1010
table
1111
tr
@@ -28,11 +28,11 @@ code-example(format='').
2828
&lt;title&gt;{{This_Does_Not_Work}}&lt;/title&gt;
2929
:marked
3030
Sorry but that won't work.
31-
The root component of our application is an element contained within the `<body>` tag.
31+
The root component of the application is an element contained within the `<body>` tag.
3232
The HTML `<title>` is in the document `<head>`, outside the body, making it inaccessible to Angular data binding.
3333

34-
We could grab the browser `document` object and set the title manually.
35-
That's dirty and undermines our chances of running the app outside of a browser someday.
34+
You could grab the browser `document` object and set the title manually.
35+
That's dirty and undermines your chances of running the app outside of a browser someday.
3636
.l-sub-section
3737
:marked
3838
Running your app outside a browser means that you can take advantage of server-side
@@ -46,19 +46,19 @@ code-example(format='').
4646
The [Title](../api/platform-browser/index/Title-class.html) service is a simple class that provides an API
4747
for getting and setting the current HTML document title:
4848

49-
* `getTitle() : string` &mdash; Gets the title of the current HTML document.
50-
* `setTitle( newTitle : string )` &mdash; Sets the title of the current HTML document.
49+
* `getTitle() : string`&mdash;Gets the title of the current HTML document.
50+
* `setTitle( newTitle : string )`&mdash;Sets the title of the current HTML document.
5151

52-
Let's inject the `Title` service into the root `AppComponent` and expose a bindable `setTitle` method that calls it:
52+
You can inject the `Title` service into the root `AppComponent` and expose a bindable `setTitle` method that calls it:
5353

5454
+makeExample( "cb-set-document-title/ts/src/app/app.component.ts", "class", "src/app/app.component.ts (class)" )(format='.')
5555
:marked
56-
We bind that method to three anchor tags and, voilà!
56+
Bind that method to three anchor tags and voilà!
5757
figure.image-display
5858
img(src="/resources/images/cookbooks/set-document-title/set-title-anim.gif" alt="Set title")
5959

6060
:marked
61-
Here's the complete solution
61+
Here's the complete solution:
6262

6363
+makeTabs(
6464
`cb-set-document-title/ts/src/main.ts,
@@ -76,17 +76,18 @@ figure.image-display
7676
7777
.l-main-section
7878
:marked
79-
## Why we provide the *Title* service in *bootstrap*
79+
## Why provide the *Title* service in *bootstrap*
8080

81-
We generally recommended providing application-wide services in the root application component, `AppComponent`.
81+
Generally you want to provide application-wide services in the root application component, `AppComponent`.
8282

83-
Here we recommend registering the title service during bootstrapping,
84-
a location we reserve for configuring the runtime Angular environment.
83+
This cookbook recommends registering the title service during bootstrapping,
84+
a location you reserve for configuring the runtime Angular environment.
8585

86-
That's exactly what we're doing.
86+
That's exactly what you're doing.
8787
The `Title` service is part of the Angular *browser platform*.
88-
If we bootstrap our application into a different platform,
89-
we'll have to provide a different `Title` service that understands the concept of a "document title" for that specific platform.
90-
Ideally the application itself neither knows nor cares about the runtime environment.
88+
If you bootstrap your application into a different platform,
89+
you'll have to provide a different `Title` service that understands
90+
the concept of a "document title" for that specific platform.
91+
Ideally, the application itself neither knows nor cares about the runtime environment.
9192
:marked
9293
[Back to top](#top)

0 commit comments

Comments
 (0)