Created
November 17, 2016 13:40
-
-
Save conmute/de89a99980bc2016818f7ad534beb80a to your computer and use it in GitHub Desktop.
Angular 1 snippets
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
angular.module("app").decorator("$controller", ['$delegate', function($delegate: Function) { | |
return function(constructor, locals) { | |
let controller = $delegate.apply($delegate, arguments); | |
if (constructor === NLayoutDesigner) { | |
console.log(controller); | |
return angular.extend(function () { | |
locals.$scope.smth = "somewhat"; | |
return controller(); | |
}, controller); | |
} | |
return controller; | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment