Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep up with a naming convention #2

Closed
altunyurt opened this issue Oct 6, 2015 · 0 comments
Closed

Keep up with a naming convention #2

altunyurt opened this issue Oct 6, 2015 · 0 comments

Comments

@altunyurt
Copy link
Collaborator

https://github.com/pharzan/MithChosen/blob/master/MithList.js#L31

        if (param['dataSet']) {
            this.data(param['dataSet']);
            this.completed(true);
        }

You are providing a config key named dataset, and passing its value to an attribute named data .

Instead, you can just extend the config structure as mentioned in #1 and access the data as

   this.config.dataSet 

And even when you are fetching the data from a remote source, you can still fill the same dataset, and use it as you would normally; like:

this.config.dataSet  = this.getDataSet(param['dataUrl'])
@pharzan pharzan closed this as completed Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants