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

example(toh-4,5): getHeroesSlowly() to return getHeroes() #2152

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Aug 19, 2016

Have getHeroesSlowly() delay and then return the value of getHeroes(). This makes it easier for user’s performing the tutorial to keep this slower method as they evolve toh-5 into toh-6.

@kwalrath @Foxandxss @filipesilva : note that I've partitioned the files. There is a TS commit and a Dart commit, each ready to be reviewed.

@Foxandxss
Copy link
Member

I am good with it, but I am unsure if the new version is a bit harder to understand (the setTimeout changes).

@chalin
Copy link
Contributor Author

chalin commented Aug 23, 2016

I think that it separates concerns so that the setTimeout(...) does just that (and nothing more); otherwise it gets a bit convoluted to integrate the call to getHeroes inside the call to setTimeout (at least I couldn't find a clean way that worked).

chalin added 2 commits August 24, 2016 15:24
Have `getHeroesSlowly()` delay and then return the value of
`getHeroes()`. This makes it easier for user’s performing the tutorial
to keep this slower method as they evolve toh-5 into toh-6.
Have `getHeroesSlowly()` delay and then return the value of
`getHeroes()`. This makes it easier for user’s performing the tutorial
to keep this slower method as they evolve toh-5 into toh-6.
@chalin chalin force-pushed the chalin-toh-4n5-get-heroes-slowly-0819 branch from 705a045 to 03cedc4 Compare August 24, 2016 22:24
@chalin
Copy link
Contributor Author

chalin commented Aug 25, 2016

@Foxandxss: can you tag as LGTM so that @wardbell can have a look at this too?

@wardbell wardbell merged commit 2bd9946 into angular:master Aug 26, 2016
@wardbell wardbell deleted the chalin-toh-4n5-get-heroes-slowly-0819 branch August 26, 2016 21:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants