Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Last active August 15, 2024 15:17
Show Gist options
  • Save rwjblue/8816372 to your computer and use it in GitHub Desktop.
Save rwjblue/8816372 to your computer and use it in GitHub Desktop.
Ember Examples

Plain HTML:

Plain Javascript:

Babel Plugin:

Codemods:

@jamesarosen
Copy link

Fantastic list!

I know you're not the author on all of these examples, but I can't think of a better place to put these comments:

  1. "Opening a window" has some HTML and JS errors. Most importantly, the <a> tags are improperly closed.
  2. Don't MousetrapMixin#activate and #deactivate have to call _super()?

@rwjblue
Copy link
Author

rwjblue commented Jan 19, 2015

@jamesarosen - Thanks, glad you like them!

  • Fixed the "opening a window" JSBin (isn't HTMLBars validation great!).
  • RE: activate and deactivate: no, the default implementation is Ember.K so no _super should be required (unless you also have additional mixins that you may want to coordinate with).

@deivinsontejeda
Copy link

Awesome list! Really useful.

@dowsanjack
Copy link

Pretty nice, thanks :)

@mgenev
Copy link

mgenev commented Jan 21, 2015

+infinity

@jeanlucaslima
Copy link

+1

@mfpiccolo
Copy link

@rwjblue Many of these are not working due to :
Error: Cannot call compile without the template compiler loaded. Please load ember-template-compiler.js prior to calling compile.

Looks like this issue on beta.1: emberjs/ember.js#10265.

@rwjblue
Copy link
Author

rwjblue commented Feb 17, 2015

@mfpiccolo - Yep, as I access them again to reference, I am updating them. If I have a chance to review them all and get 'em updated I will....

@bradplank
Copy link

Awesome list! I was hoping to find a example w/ Dropzone.js (http://www.dropzonejs.com/).

@e00dan
Copy link

e00dan commented Apr 4, 2015

Maybe something on unit testing controllers with models and saving them?

@lessless
Copy link

here is the updated viewName example emberjs/ember.js#11156 (comment)

@KTKate
Copy link

KTKate commented Jul 6, 2015

I use this a lot and appreciate it. :) Thanks for making it.

Not sure the proper way to suggest an edit. In this one http://emberjs.jsbin.com/rwjblue/569/edit?html,js,output there seems to be an extra - before concat in the html. I think this:

{{ef-custom-input id=(-concat elementId "-input" separator="") value=currentValue parent=this}}

should be this:

{{ef-custom-input id=(concat elementId "-input" separator="") value=currentValue parent=this}}

@Cryrivers
Copy link

Really awesome list. Thanks for sharing!

@ericop
Copy link

ericop commented Feb 3, 2016

Awesome list, and amazing reference!
Just one to add to the fix'em up list, http://emberjs.jsbin.com/rwjblue/55/edit - Using liquid-fire animations in globals mode .
If you can compile liquid-fire up to ...-liquid-fire-0.23.0.js and add ember-template-compiler.js I think you'd be most of the way there on version compatibility with Ember 2.3.

@olsi22
Copy link

olsi22 commented Feb 17, 2017

In every example with checkbox or radio button the console gives some error and it cant run . Here is one of the pages example http://emberjs.jsbin.com/rwjblue/58/edit?html,js,output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment