本文整理汇总了TypeScript中rebirth-common.RebirthWindow类的典型用法代码示例。如果您正苦于以下问题:TypeScript RebirthWindow类的具体用法?TypeScript RebirthWindow怎么用?TypeScript RebirthWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RebirthWindow类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(private elmRef: ElementRef, private renderer: Renderer, private rebirthWindow: RebirthWindow) {
let protocol = this.rebirthWindow.getOwnerDocument(this.elmRef).location.protocol === 'https:' ? 'https:' : 'http:';
this.duoShuoUrl = `${protocol}//static.duoshuo.com/embed.js`;
this.rebirthWindow.getGlobalObject().duoshuoQuery = { short_name: "greengerong" };
}
示例2: ngOnInit
ngOnInit() {
let duoshuoElm = this.elmRef.nativeElement.querySelector('.ds-thread');
this.rebirthWindow.createScript(`${this.duoShuoUrl}?rn=${Math.random()}`,
this.renderer, this.elmRef, () => {
this.rebirthWindow.getGlobalObject().DUOSHUO.EmbedThread(duoshuoElm);
});
}
示例3: setTimeout
setTimeout(() => this.rebirthWindow.getGlobalObject().alert(`${this.article.title}修改成功`));
示例4:
this.renderer, this.elmRef, () => {
this.rebirthWindow.getGlobalObject().DUOSHUO.EmbedThread(duoshuoElm);
});
示例5:
.subscribe(result => {
this.article = result;
this.rebirthWindow.scrollToTop(this.elmRef);
}, (e) => console.log(e, 'ArticleListComponent error'));