2

I am talking about Angular 1.x directives that do not have a template. Directives with the restrict property set to 'A' (attribute directive).

I can't find any documenten on how to upgrade these directives from Angular 1.x to an Angular 5 directive. Is this at all possible? If so how?

I am using UpgradeModule from '@angular/upgrade/static'. Upgrading and downgrading of regular components and services is working fine.

Narm
  • 10,677
  • 5
  • 41
  • 54
Erik Nijland
  • 1,181
  • 2
  • 9
  • 24
  • What you're referring to is an Attribute Directive, perhaps this link will help: https://stackoverflow.com/questions/45968683/is-it-possible-to-upgrade-angularjs-atttribute-directives-to-use-in-angular-4 – Narm Mar 22 '18 at 18:28
  • Not really. I don't need a template. I want to manipulate href attributes on existing links. – Erik Nijland Mar 22 '18 at 18:34
  • The question lacks http://stackoverflow.com/help/mcve . If you have problems with directive *behaviour* and not just that it has attribute selector, then the question should contain all relevant details. Since DOM manipulations should be performed in Angular in very special way, there's a chance that a directive cannot be properly upgraded and should be converted instead. – Estus Flask Mar 22 '18 at 18:40

0 Answers0