Ember provides a text field view that makes generating text input fields pretty simple. What’s really cool is with the simple addition of onEvent=”keyPress” and action=”my_function” you can monitor changes to the field as the user types. It looks something like this: (On a side note you can also just add an observer to your…
Category: Javscript
Help with Ember.js
So you’ve discovered the most awesome front end javascript framework ever or at least that’s what the cool kids are saying. Now you want so help. Besides StackOverflow here are a few resources that might be helpful: The Ember API docs. Bootstrap for Ember Demo (The code) There’s also: Ember Bootstrap (The code) Ember video…
Passing a value to ember.js view from handlebars template
This is one of those things that should be easy and it’s probably obvious to most people but it threw me for a while. I wanted to pass a value into my ember.js view at the moment that I declare the view. It’s a static value, just a css class name, so it doesn’t need…
Immutable Arrays in Ember.js
I ran into another interesting situation with ember.js today. We make a request to the server to get a collection of objects for the application route. That request sends parameters that the server uses to filter the results which means that ember will give you an immutable object. The code is pretty typical and looks…
Handle Keyboard events in an Ember.js view
We ran into a situation where we wanted to be able to close our ember.js view (a modal) when the user pressed the esc key. At first I thought the solution was easy and I ended up with some code like this: App.ModalView = Ember.View.extend({ didInsertElement: function(){ $(document).on(‘keyup’, { _self: this }, this.esc_close); }, esc_close:…
Building with Ember
We’re currently building a couple of projects for a group at MIT and for a current Techstars company in the Kaplan program which has given us a chance to try out ember.js on real projects. Ember is an incredible framework started by two really smart guys Yehuda Katz Tom Dale. It’s new and it’s hot…