在这里,我尝试使用 [(ngModel)] 渲染一个 word 文件,但它没有按要求工作。还有其他方法吗?
我用过 Angular 10
提前致谢
HTML:
<div class="row">
<div class="col-12">
<ejs-documenteditorcontainer
serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/documenteditor/"
style="display:block;height:660px" [enableToolbar]=true [(ngModel)]="editor"> </ejs-documenteditorcontainer>
</div>
</div>
TS:
import { Component, ViewEncapsulation } from '@angular/core';
import { ToolbarService } from '@syncfusion/ej2-angular-documenteditor';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
providers: [ToolbarService]
})
export class AppComponent {
editor: any = 'www.someWordFileFromOneDriveOrFromGoogleDrive.com'
}