Skip to content

Instantly share code, notes, and snippets.

@lega911
Created October 30, 2015 14:23
Show Gist options
  • Save lega911/7a138d7985f6060d6140 to your computer and use it in GitHub Desktop.
Save lega911/7a138d7985f6060d6140 to your computer and use it in GitHub Desktop.
alight.hooks.directive.push({
code: 'scope',
fn: function() {
var parentScope;
if (this.directive.scope) {
parentScope = this.scope;
if (this.directive.scope === 'root') {
this.scope = parentScope.$new('root');
} else {
this.scope = parentScope.$new(this.directive.scope === 'isolate');
}
this.result.owner = true;
return this.doBinding = true;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment