I have the following AMD module defined in the "test.js" file:
define(
'myModule',
function () {
'use strict';
return function (module) {
function myModule(translator) {
return {
restrict: 'A',
link: link
};
function link(scope, element, attrs) {
}
}
return myModule;
};
});
Then I load this module using System.JS and module loads without any issues.
My question is how can I include that module in my Angular 2 TypeScript module definition?
import myModule = require('myModule');
The above will not work as it will complain about cannot find 'myModule'.
I need to be able to access the "link" function from my AMD module inside my Angular 2 module.
Any ideas?