小编Har*_*hah的帖子

带有Angular 2的DialogAPI:使用displayDialogAsync在对话框中对我的角度2组件进行Diasplay

我是Angular 2和office js的新手.我读了一下displayDialogAsync并创建了一个样本.

我的工作样本现在显示html页面,但我想在office js对话框中显示角度2组件,然后尝试将其重定向到不同的域.

HTML页面:Waiting.html(仅等待2秒)

app.Component.html :::

<div>

<router-outlet></router-outlet>
    <br /> Testing...
    <div class="ms-Grid">
        <div class="ms-Grid-row">
            <div class="ms-Grid-col">
                <input type="button" value="OpenDialog" (click)="openDialog()" />
            </div>
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

组件:AppComponent

import { Component, OnInit, Input } from '@angular/core';
import { WordService } from './office/word.service';
import { Router, ActivatedRoute, ActivatedRouteSnapshot, NavigationEnd, RouterStateSnapshot, Event, UrlSerializer } from '@angular/router';
import { Location } from '@angular/common'

@Component({
    moduleId: module.id,
    selector: 'addin',
    templateUrl: 'app.component.html',
    providers: [WordService]
})

export class AppComponent implements OnInit {
    title: string = …
Run Code Online (Sandbox Code Playgroud)

javascript office-js angular2-routing angular

5
推荐指数
0
解决办法
304
查看次数

标签 统计

angular ×1

angular2-routing ×1

javascript ×1

office-js ×1