This file contains hidden or 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 engineer = { name: 'Joe Sixpack', salary: 50 }; | |
| var interceptor = { | |
| set: function (receiver, property, value) { | |
| console.log(property, 'is changed to', value); | |
| receiver[property] = value; | |
| } | |
| }; | |
| engineer = Proxy(engineer, interceptor); |
This file contains hidden or 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 myApp = angular.module('myApp', []); | |
| myApp.directive('repository', function() { | |
| return { | |
| restrict: 'C', | |
| scope: { | |
| owner: '@repoOwner', | |
| name: '@repoName' | |
| }, | |
| link: function(scope, element, attrs, controller) { | |
| //attach to 'repoOwner' due to ordering of attributes in element. TODO: Is there a better way? |
NewerOlder