Convert directive from Angular1 to Angular2

Discussão em 'Angular' iniciado por Gad, Abril 30, 2025.

  1. Gad

    Gad Guest

    I am trying to migrate from angular1 to angular2 (on Javascript), how would I write this in Angular2? I am awfully confused

    Thank you

    module.directive('asiPath', function($compile) {
    return function(scope, element, attrs) {
    scope.$watch(
    function(scope) { return scope.$eval(attrs.asiPath); },
    function(value) { asimon.template.load(element, attrs, scope); }
    );
    };
    });

    Continue reading...

Compartilhe esta Página