Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
people: [{id:"user1", firstname: "user1"},{id:"user1", firstname: "user1"},{id:"user1", firstname: "user1"},{id:"user1", firstname: "user1"},{id:"user1", firstname: "user1"},{id:"user1", firstname: "user1"}],
test:"testing"
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Jumping Balls',
jumpingBalls: [{"newBall": true}],
ball: {"newBall": true},
actions: {
}
});
@lovelykaushik86
lovelykaushik86 / ngFocusOut.js
Created March 4, 2014 10:05
AngularJS ngFocusOut directive - If you are new in angularJs you can use this by adding in your HTML tag. e.g. <input type = "text" ng-focus-out = "$scope.bool = true">
appStrapDirectives.directive('ngFocusOut', function( $timeout ) {
return function( $scope, elem, attrs ) {
$scope.$watch(attrs.ngFocusOut, function( newval ) {
if ( newval ) {
$timeout(function() {
elem[0].focusout();
}, 0, false);
}
});
};