Skip to content

[RFR] Expose field constructors to avoid Webpack/Babel fuss#653

Merged
jpetitcolas merged 1 commit intomasterfrom
getFieldConstructor
Sep 2, 2015
Merged

[RFR] Expose field constructors to avoid Webpack/Babel fuss#653
jpetitcolas merged 1 commit intomasterfrom
getFieldConstructor

Conversation

@fzaninotto
Copy link
Copy Markdown
Member

It becomes possible to recuperate a field constructor without installing the admin-config module:

var NumberField = nga.getFieldConstructor('number');

// now create a new class extending NumberField
function AmountField(name) {
  NumberField.call(this, name)
}
AmountField.prototype = new NumberField();
AmountField.prototype.constructor = AmountField;
// or something like that

jpetitcolas added a commit that referenced this pull request Sep 2, 2015
[RFR] Expose field constructors to avoid Webpack/Babel fuss
@jpetitcolas jpetitcolas merged commit 4e0c502 into master Sep 2, 2015
@jpetitcolas jpetitcolas deleted the getFieldConstructor branch September 2, 2015 16:46
@armellarcier
Copy link
Copy Markdown
Contributor

This is pretty cool! Thanks!

@manuelnaranjo
Copy link
Copy Markdown

pretty cool feature!

@armellarcier
Copy link
Copy Markdown
Contributor

Thanks guys! Your test/build workflow is really worth the fuss though!
Learned a lot from it! I moved to "vanilla" angular material because of the
apparent lack of Rest provider access since then. There is something
exciting there too!
Cheers!
Le ven. 4 sept. 2015 à 21:03, Manuel Francisco Naranjo <
[email protected]> a écrit :

pretty cool feature!


Reply to this email directly or view it on GitHub
#653 (comment).

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.

4 participants