You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Todd, I have used your guides / website in the past and they are awesome, keep up the good work!
I think I have found some errors in the TS version with regards to defining directives as TS Classes.
Below is the version currently published in your TS specific style guide.
I believe there is one syntax error: $timeout is referenced in the link function without 'this'.
While not an error, in TS, instance properties can be set without assigning them in the constructor; e.g.
class MyDirective implements angular.Directive {
restrict: string = 'A';
priority: number = 0;
}
If you aren't using ng-annotate, it doesn't seem to be enough to specify the required dependencies in a static $inject array (also 'ngInject' string literal is missing from the example). You may have to register them manually with a static method: e.g.
Hi Todd, I have used your guides / website in the past and they are awesome, keep up the good work!
I think I have found some errors in the TS version with regards to defining directives as TS Classes.
Below is the version currently published in your TS specific style guide.
I believe there is one syntax error: $timeout is referenced in the link function without 'this'.
While not an error, in TS, instance properties can be set without assigning them in the constructor; e.g.
If you aren't using ng-annotate, it doesn't seem to be enough to specify the required dependencies in a static $inject array (also 'ngInject' string literal is missing from the example). You may have to register them manually with a static method: e.g.
That seems to be working in my case (1.5.11, TS 2.4). I hope this could help other folks who have had similar issues.
Once again thanks again for all that you have contributed to the Angular(js) community!
The text was updated successfully, but these errors were encountered: