Skip to content

Instantly share code, notes, and snippets.

View evangalen's full-sized avatar

Emil van Galen evangalen

View GitHub Profile
@evangalen
evangalen / app.js
Last active December 14, 2015 11:09
AngularJS Starter (for usage in "http://plnkr.co/")
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
});
<script type="text/javascript">
'use strict';
var defineGetterAndSetterProperty = function(sourceObject, targetObject, property) {
Object.defineProperty(targetObject, property, {
set: function (newValue) {
sourceObject[property] = newValue;
},
get: function () {
return sourceObject[property];