Hi all,
Using Type script I am able to call a method in a single JS file. But when I try to call the method from another js file it is not working
The below is my employess.ts class
import {Address} from "./Address";
module TestType{
export class Employee {
public objAddress: Address = new Address();
static Test(): void {
alert("12");
var obj1 = new Employee();
obj1.objAddress.strAddressName = "TestData"
alert(obj1.objAddress.strAddressName);
}
}
}
In which I have used address class by using import method.
The below is my address.ts file class
export class Address {
public strAddressName: string = "";
}
I have added the employee.js file in the form onload and call Test method in control OnChange.
It throws error as "export is undefined" and "require is undefined"
Any suggestions?