-
POJO's
- http://emberjs.jsbin.com/OfApOyIt/3/edit - Defining computed properties on a POJO.
-
Routing
- http://emberjs.jsbin.com/rolo/1 - Shows route hook ordering.
- http://emberjs.jsbin.com/pojim/1/edit - Using plain HTML links to transitionTo (by @mjijackson).
-
Service
- http://emberjs.jsbin.com/luhoquxi/7 - Growl Notifications (by @bcardarella)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> | |
<link rel="stylesheet" href="iui.css" type="text/css" /> | |
<link rel="stylesheet" href="t/default/default-theme.css" type="text/css"/> | |
<script type="application/x-javascript" src="iui.js"></script> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Robot = function(robot) { | |
robot.rotateCannon(-90); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(); | |
//i'll add a clone but i need to refactor collision | |
//robot.clone(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#global module:false | |
module.exports = (grunt) -> | |
# Project configuration. | |
grunt.initConfig | |
meta: | |
version: "0.1.0" | |
banner: "/*! PROJECT_NAME - v<%= meta.version %> - " + "<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "* http://PROJECT_WEBSITE/\n" + "* Copyright (c) <%= grunt.template.today(\"yyyy\") %> " + "YOUR_NAME; Licensed MIT */" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#adds class '<fieldname>' or '<relatedmodel__fieldname>' based on valueBinding | |
Em.View.reopen | |
init: -> | |
@_super.apply(@, arguments) | |
if Em.testing | |
testing_class = this.valueBinding?._from?.match(/[\w|\d]+\.[\w|\d]+$/)?[0] | |
if testing_class | |
testing_class = testing_class.replace('context.','').replace('.','__') | |
classes = @get('classNames') || [] | |
classes.push testing_class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load templates for routes | |
Em.Route.reopen | |
renderTemplate: -> | |
# ignore *.index routes | |
if @routeName.match /\.index$/ | |
return | |
name = @routeName.replace(/\./g, '/') | |
tmpl_path = @templateName || name | |
_this = this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
external = ~/git-diff.sh | |
[merge] | |
tool = diffmerge | |
[mergetool "diffmerge"] | |
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\"" | |
trustExitCode = true | |
[difftool "diffmerge"] | |
cmd = diffmerge \"$LOCAL\" \"$REMOTE\" | |
[mergetool] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.ApplicationController = Em.Controller.extend | |
login: -> | |
if App.get('user') | |
Em.RSVP.resolve() | |
else | |
# try to log in via sessionid | |
new Ember.RSVP.Promise (resolve, reject)=> | |
# your login implementation here | |
# get cookie here and try to set App.user | |
# call reject() when fail |
OlderNewer