我正在尝试从angular1迁移到angular2(在Javascript上),我将如何在Angular2中编写它?我非常困惑
谢谢
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); }
);
};
});