Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Allow object to be specified as the controller in a route match statemen... #846

Merged
merged 1 commit into from
Feb 21, 2015

Conversation

pdlug
Copy link
Contributor

@pdlug pdlug commented Feb 13, 2015

Very simple change to allow object to be specified as the controller in a route match statement (e.g. match 'foo', controller: FooController, action: 'show'), if the object is given it is returned immediately by loadController since it is already loaded. If the parameter is anything else the previous behavior applies. This enables chaplin to work with tools like webpack and browserify where dynamic requires cause problems.

…ment (e.g. `match 'foo', controller: FooController, action: 'show'`).
@chrisabrams
Copy link
Contributor

I like this simple approach to solving dynamic requires. Great job!

@pmlt
Copy link

pmlt commented Feb 20, 2015

I second this change. I am trying to get a new project started with webpack and chaplin and I just can't get it working. Can you please merge this change in as part of the next release?

paulmillr added a commit that referenced this pull request Feb 21, 2015
Allow object to be specified as the controller in a route match statemen...
@paulmillr paulmillr merged commit df1da61 into chaplinjs:master Feb 21, 2015
rashfael referenced this pull request Nov 18, 2015
paulmillr added a commit that referenced this pull request Dec 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants