2.angular-cli.json更新引用路径
"apps": [
{
"root": "src",
"outDir": "dist",
"scripts": [ "assets/xlsx/xlsx.full.min.js" ],
}
],
3. *.component.ts引用
declare let XSX;
@Component({
selector: 'app-addevent',
templateUrl: './addevent.component.html',
})
export class addeventComponent {
ngOnInit() {
}
}
4. *.component.html引用
<input id="file" type="file" (change)="onSelectFile($event)" >
1