Last active
August 29, 2015 14:09
-
-
Save jstrimpel/97fc8146adb1f3bea425 to your computer and use it in GitHub Desktop.
lazo application filters example
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
define(['lazoApp', 'app/filters/auth'], function (LazoApp, authFilter) { | |
'use strict'; | |
return LazoApp.extend({ | |
initialize: function (callback) { | |
LAZO.app.addRequestFilter('.*', authFilter); | |
callback(); | |
} | |
}); | |
}); |
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/filters/auth.js | |
define(function () { | |
'use strict'; | |
return function (path, params, ctx, options) { | |
console.log('filter'); | |
options.success(); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment