我正在尝试将Robo 3T连接到我的在线数据库,它似乎没有工作.我可以用它连接到本地数据库.我尝试使用MongoDB Compass连接,并且Details和Auth工作正常,我能够连接.但是当我在Robo 3T中连接相同的细节时,它似乎并没有起作用.我该如何解决?我正在使用Robo 3T版本1.1我尝试使用Robomongo 1.0,但仍然得到相同的错误
我正在使用MdDialogModule来显示一个带有输入字段的Dialog窗口.Modal打开正常,我可以在输入字段中输入文本并提交,但是点击提交按钮,我希望输入表单中的数据返回到调用Dialog组件的主组件,并关闭对话框.
我该怎么做呢?我能够将数据传递给MdDialog组件,但没有找到任何关于如何从MdDialogComponent将数据返回到组件的资源.
我的Dialog组件代码如下所示
import { Component, OnInit, InjectionToken, Inject } from '@angular/core';
import { MD_DIALOG_DATA, MdDialogRef } from "@angular/material";
@Component({
selector: 'app-add-book',
templateUrl: './add-book.component.html',
styleUrls: ['./add-book.component.css']
})
export class AddBookComponent {
constructor() { }
}
Run Code Online (Sandbox Code Playgroud)
调用对话框的主要组件中的方法如下所示.现在没有返回任何响应,它返回Undefined,因为我还没有想出来.
openCreateDialog() {
let dialogRef = this.dialog.open(AddBookComponent)
.afterClosed()
.subscribe(response => {
console.log(response);
});
}
Run Code Online (Sandbox Code Playgroud) 我试图运行我的Ionic项目.它在几天前工作正常,现在我无法运行它,无论我做什么.这个错误出现了!我尝试从package.json和node_modules中删除Rxjs,也注释掉了我使用Rxjs的所有地方,但仍出现此错误.在Ubuntu 16.04中尝试使用Node 8.9.0和npm 4.5.0.也尝试在Windows中运行相同仍然显示相同的错误!我该如何解决?
下面是我的 Node app.js 代码。使用这些设置,我收到连接超时错误。知道我在这里缺少什么吗?
var nodemailer = require("nodemailer");
var transporter = nodemailer.createTransport({
host: 'smtp.zoho.com',
port: 465,
secure: true, // use SSL
auth: {
user: '<myemail@example.com>',
pass: '<myemailpassword>'
}
});
var mailOptions = {
from: "<fromemail@example.com>",
to: "<toemail@example.com>",
subject: "Hello",
generateTextFromHTML: true,
html: { path: './tmpl.html' }
};
transporter.sendMail(mailOptions, function(error, response) {
if (error) {
console.log(error);
} else {
console.log(response);
}
transporter.close();
});
Run Code Online (Sandbox Code Playgroud)
显示错误
{ Error: Connection timeout
at SMTPConnection._formatError (/home/ubuntu/workspace/mailapp/node_modules/nodemailer/lib/smtp-connection/index.js:557:19)
at SMTPConnection._onError (/home/ubuntu/workspace/mailapp/node_modules/nodemailer/lib/smtp-connection/index.js:530:20)
at Timeout._connectionTimeout.setTimeout (/home/ubuntu/workspace/mailapp/node_modules/nodemailer/lib/smtp-connection/index.js:248:18)
at ontimeout (timers.js:380:14)
at …Run Code Online (Sandbox Code Playgroud)