angularjs template or not

when do we need to use template?

  • link to state or url?
  • use ng-view or ui-view

for market/store/prd etc. is template needed?

  • a very simple template?
  • homepage -> just load the content
  • markets -> load the content
  • stores -> load the content
  • products -> load the content
  • market -> with template, just pass the data; wo template, how to parse the data?

=> need dynamic routing

http://stackoverflow.com/questions/28184616/lazy-load-template-and-controller-in-angular-ui-router

http://stackoverflow.com/questions/15780269/dynamic-routing-in-angularjs-can-i-retrieve-data-from-server-before-setting-up

http://stackoverflow.com/questions/30123690/loading-angular-ui-routes-from-server

=> this works

http://plnkr.co/edit/kGvrPdINl7M0WoHZGnyU?p=preview

http://stackoverflow.com/questions/26868796/angular-and-ui-router-how-to-set-a-dynamic-templateurl        => #2

=> use http cache to address the cache issue

Advertisements
This entry was posted in Design. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s