I am attempting to incorporate an external html
file into my Angular component:
import { LoginController } from './login.controller';
import './login.scss';
import './login.html';
class LoginComponent implements ng.IComponentOptions {
public template: string;
public controller: Function;
public bindings : any;
constructor(){
this.controller = LoginController;
this.bindings = {
username: '@',
password: '@'
};
this.template = //reference to login.html here
}
}
export { LoginComponent };
I am using typescript along with the following tsconfig.json
:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
},
"exclude": [
"typings/main.d.ts",
"typings/main",
"node_modules"
]
}
Furthermore, I am experiencing difficulties in referencing the imported HTML within the component itself?
The webpack build appears to be functioning correctly.