-
Notifications
You must be signed in to change notification settings - Fork 875
Add "set title" cookbook by Ben Nadel #1069
Conversation
Hi Ben - I've tweaked it to get around the rough spots, illustrate some of our elements of style, and open some possibilities for the future. I linked The plunker is working now. I'm not sure what was wrong or how I fixed it. There were some HTML tags that weren't quite correct ( It may have been the tabs. All of our code samples use two spaces for tabs. I converted your code accordingly. Please set your environment to do that automagically. Other style points
Just meAs other author's know, I have a hard time keeping my hands off the prose. I elaborated on why you are right to register the Title service in bootstrap when we almost always register application wide services in the root I added the observation that one could grab the The plunker doesn't show the title changing. This is a problem I first encountered with routing. I provided a little instruction to show you can see the change in pop-up window mode. Tell me when it's ready!There is a future task that I hid in Jade comments ... how to use the Title service to set the back/forward buttons in navigation. Maybe you'll take that on at some point. We can talk about it. But I'd be happy to publish now ... or as soon as you give the signal that you think it is ready ... and someone adds an e2e test Cheers, |
@wardbell thank you for the in-depth feedback. I can totally get on board with the syntax and prose style for the docs. And certainly no worries about editing the prose yourself - I assume you have a better holistic sense of continuity than anyone else here, so do what you think is right. I did try looking at the e2e testing, but was very unclear on how they worked (I'm honestly not a big tester yet). I will try to dig in a bit more. |
Also, is there a tool you use to create those GIFs? And, is the addition to the |
You can use snagit or if you use mac, gifgrabber. Then simply move the .gif into resources and commit it. |
@Foxandxss awesome, thanks! |
@wardbell I think the edits you made are solid. I left one question about one of the code-snippets; but otherwise, I think I understand the style that you guys are using. I still have to add the e2e tests. I will get that done this week - but may need some help with figuring out how to do that. After this is all done, I will be much better with my iterations - once I have my bearings, it will flow more naturally. |
@bennadel If you have too much trouble with the e2e, just ping me and I help you. |
Awesome, thanks! |
eb11ea8
to
8601856
Compare
Where did I do I thought I was pretty darned clear that wouldn't work ... although I neglected to make it look like a binding so I MUST do that to complete the example.
Do you see any ambiguity there? ;-) |
8601856
to
6532e71
Compare
bootstrap(AppComponent, [ Title ]) | ||
// #enddocregion bootstrap-title | ||
.then( | ||
() => window.console.info( 'Angular finished bootstrapping your application!' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should remove the reference to window here to make sure it works on all environments, and you already use console directly in all the other files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ocombe In general, I would agree. But, in this case, I'm using the Browser bootstrap. If I were to use a different bootstrap, I think that's when you would need to change the way the promise is handled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh true :)
@wardbell @Foxandxss I added an e2e-test. Would one of you be so kind as to take a peek and let me know if this is what is expected? |
@bennadel It is lovely. |
Sweet! Merging it now |
DO NOT MERGE. Work in progress.