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

Remove passing view options as a function #2486

Merged

Conversation

paulfalgout
Copy link
Member

Resolves #2229

Essentially Marionette.Views allow you to pass in options as a function like:

var optionsFunc = function(){
  return {
    foo: 'bar'
  };
};
var myView = new Marionette.View(optionsFunc);

For one thing it is inconsistent with option handling on anything that is not a view: https://github.com/marionettejs/backbone.marionette/blob/master/src/object.js#L7

And another thing.. it is really pretty pointless and probably promotes bad patterns.

Also it was a largely broken "feature" for most of its existence.

@jasonLaster
Copy link
Member

👍

@ahumphreys87
Copy link
Member

👍

ahumphreys87 added a commit that referenced this pull request Apr 11, 2015
…tion

Remove passing view options as a function
@ahumphreys87 ahumphreys87 merged commit 2a15426 into marionettejs:next Apr 11, 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

Successfully merging this pull request may close these issues.

None yet

3 participants