This repository was archived by the owner on Sep 7, 2018. It is now read-only.
This repository was archived by the owner on Sep 7, 2018. It is now read-only.
use of private $$scope instead of $scope in class for Directive #4
Open
Description
I don't get it here, the injection of
@directive('ngModuleName', 'atSomeDirective')
class SomeDirectiveController {
public static controllerAs: 'someDirectiveCtrl';
public static templateUrl: string = '/partials/some-directive.html';
public static link: angular.IDirectiveLinkFn = (scope, element, attrs, ctrl: SomeDirectiveController) => {
ctrl.init(attrs.atSomeDirective);
};
constructor(
@inject('$scope') private $$scope: angular.IScope,
@inject('$parse') private $$parse: angular.IParseService
) {
// do stuff with $$scope and $$parse;
}
public init(anArg: string): boolean {
// do some stuff with this.$$parse and this.$$scope
}
}