Skip to content

Instantly share code, notes, and snippets.

View dhwang's full-sized avatar
💭
I may be slow to respond.

Darren Hwang dhwang

💭
I may be slow to respond.
  • San Jose
View GitHub Profile
@dhwang
dhwang / lodash.extends
Created April 6, 2017 00:19
lodash subclass
_.mixin({
'extends': function(child, base, props) {
child.prototype = _.create(base.prototype, _.assign({
'_super': base.prototype,
'constructor': child
}, props));
return child;
}
});
@dhwang
dhwang / ReportView.js
Created September 28, 2015 19:06
Backular, injecting Angular view into Backbone
render: function (el) {
var self = this;
self.$el.empty();
self.$el.html(PageTemplate);
if (!window.quotainjector) {
window.quotainjector = window.angular.bootstrap(document, ['QuotaReportView'])
window.quotainjector.invoke(function($rootScope) {
console.log('invoke self.periodYears',self.periodYears)