我有点困惑,因为一些教程使用#来获取输入,而有些使用[(ngModel)]
我正在尝试将AWS X射线实施到我当前的项目中(使用Node.js和Serverless框架).我试图将X射线连接到我的lambda函数之一,我遇到了问题
Error: Failed to get the current sub/segment from the context.
at Object.contextMissingRuntimeError [as contextMissing] (/.../node_modules/aws-xray-sdk-core/lib/context_utils.js:21:15)
at Object.getSegment (/.../node_modules/aws-xray-sdk-core/lib/context_utils.js:92:45)
at Object.resolveSegment (/.../node_modules/aws-xray-sdk-core/lib/context_utils.js:73:19).....
Run Code Online (Sandbox Code Playgroud)
代码如下:
import { DynamoDB } from "aws-sdk";
import AWSXRay from 'aws-xray-sdk';
export const handler = async (event, context, callback) => {
const dynamo = new DynamoDB.DocumentClient({
service: new DynamoDB({ region })
});
AWSXRay.captureAWSClient(dynamo.service);
try {
// call dynamoDB function
} catch(err) {
//...
}
}
Run Code Online (Sandbox Code Playgroud)
对于这个问题,我使用的解决方案来自 https://forums.aws.amazon.com/thread.jspa?messageID=821510褆
我试过的另一个解决方案来自https://forums.aws.amazon.com/thread.jspa?messageID=829923ꧣ
代码就像
import AWSXRay from 'aws-xray-sdk';
const AWS = …Run Code Online (Sandbox Code Playgroud) amazon-web-services node.js aws-lambda serverless-framework aws-xray
onSubmit(formData) {
if(formData.valid) {
console.log(formData.value);
this.af.auth.createUser({
email: formData.value.email,
password: formData.value.password
}).then(
authState => {
authState.auth.sendEmailVerification();
this.router.navigate(['/login'])
}).catch(
(err) => {
console.log(err);
this.error = err;
})
}
}
Run Code Online (Sandbox Code Playgroud)
在Firebase中,我设置了SendEmailVerfication上面的代码,电子邮件可以正常发送.但是,在我的应用中,没有点击验证电子邮件的用户与点击的用户之间没有区别,如何有所作为?
<svg class="paint">
<g>
<ellipse class="svgobject" cx="336" cy="155.88748168945312" rx="68" ry="43" fill="black" stroke="black" id="1"></ellipse>
</g>
Run Code Online (Sandbox Code Playgroud)
上面是Chrome中出现的HTML元素我使用这段代码将元素添加到组中
function tool_group(event, target) {
group = document.createElement('g');
group.appendChild(target[0]);
svg.appendChild(group);
}
Run Code Online (Sandbox Code Playgroud)
结果是,当我触发该功能时,该元素将在屏幕上消失.问题是什么?任何帮助表示赞赏.
angular ×1
angularfire2 ×1
aws-lambda ×1
aws-xray ×1
firebase ×1
javascript ×1
jquery ×1
node.js ×1
svg ×1