Created
September 16, 2014 08:22
-
-
Save fxxkscript/bbb40aca52a036fbe764 to your computer and use it in GitHub Desktop.
aspect demo
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 Widget = require('core/widget'); | |
| var subWidget = Widget.extend({ | |
| hello: function() { | |
| console.log('hello'); | |
| } | |
| }); | |
| var widget = new subWidget(); | |
| widget.before('hello', function() { | |
| console.log('before hello'); | |
| }); | |
| widget.before('hello', function() { | |
| console.log('before hello 2'); | |
| }); | |
| widget.hello(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment