Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Basic Ember.js Model

View computed_property_model.coffee
1 2 3 4 5 6 7
App.UserSignUpModel = Em.Object.extend
name: null
email: null
isValidEmail: () ->
validEmailRegex = new RegExp^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\.]{1}[0-9a-zA-Z]+[\.]?[0-9a-zA-Z]+$”
validEmailRegex.test(@get('email'))
.property('email')
View computed_property_model.coffee
1 2 3
user = App.UserSignUpModel.create
name: 'Jonathan Conway'
email: 'test@test.com'
View computed_property_model.coffee
1 2 3 4
App.UserSignUpModel = Em.Object.extend
name: null
email: null
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.