angular - Separating data from the component -


so trying learn angular 2 , reading documentation , saw found here:

we defining our data directly inside our component. that's fine demo isn't best practice. it's not practice. although won't in chapter, we'll make mental note fix down road.

my question best practice place data? read farther documentation , wasn't clear. guess in service of component?

dynamic data should loaded via services. if have static data can place in mock file. here example tour of heroes (you reach point later).


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo