ansonphong / postworld

Wordpress Theme Development Framework
GNU General Public License v2.0
7 stars 0 forks source link

Angular // feed_init Object - Set Defaults #10

Closed ansonphong closed 11 years ago

ansonphong commented 11 years ago

Note to self - Create default object for var feed_init = {}, and merge with feed_init['feed_id'] object which overrides settings, before setting it into feed_data Object, otherwise undefined settings will cause the controllers to malfunction.

michelhabib commented 11 years ago

I will probably take over that note :) I am now using a singleton [AngularJS Factory Service] to maintain feed_init and feed_data, to be used across the app. This will make it easy to access throughout the application. Still at the same time, you can set the initial feed_init in Script as you already demonstrated in the first draft.

By the way, is there a real need for the merge? the feed_init data is unlikely to change, maybe we can keep it this way and reference it when needed? Thoughts? I will propose my design regarding the whole workflow and structure from the AngularJS side, we might have a better picture then.

ansonphong commented 11 years ago

Good idea about questioning the feed_init merge into feed_data. We could optionally keep it freestanding and rename to 'feed_settings'. How about that?

On Wednesday, October 2, 2013, michelhabib wrote:

I will probably take over that note :) I am now using a singleton [AngularJS Factory Service] to maintain feed_init and feed_data, to be used across the app. This will make it easy to access throughout the application. Still at the same time, you can set the initial feed_init in Script as you already demonstrated in the first draft.

By the way, is there a real need for the merge? the feed_init data is unlikely to change, maybe we can keep it this way and reference it when needed? Thoughts? I will propose my design regarding the whole workflow and structure from the AngularJS side, we might have a better picture then.

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/10#issuecomment-25527364 .

michelhabib commented 11 years ago

Agreed, sounds more user friendly. I am changing it now in the code to feed_settings and will update the documentation once i have the main code structure in place.

ansonphong commented 11 years ago

Great, thanks.

On Wednesday, October 2, 2013, michelhabib wrote:

Agreed, sounds more user friendly. I am changing it now in the code to feed_settings and will update the documentation once i have the main code structure in place.

— Reply to this email directly or view it on GitHubhttps://github.com/phongmedia/postworld/issues/10#issuecomment-25554299 .

michelhabib commented 11 years ago

all references now go to feed_settings