小编Tri*_*hak的帖子

如何在toastr中显示多行消息?

如何在toastr中显示多行错误信息?

我已经格式化了如下所示的错误消息

"Please fix the following: \r\nFirst Name is required\r\nLast Name is required\r\nEmail Address is required\r\n"
Run Code Online (Sandbox Code Playgroud)

但在toasrt中它显示在单行中.请帮忙

toastr

11
推荐指数
3
解决办法
9730
查看次数

Dynamo DB + In put Item Request如何传递空值?

我有一个字段,我在模型中声明为字符串,如下所示:

App.Student= DS.Model.extend({
name: DS.attr('string'),
address1: DS.attr('string'),
address2: DS.attr('string'),
city: DS.attr('string'),
state: DS.attr('string'),
postal: DS.attr('string'),
country: DS.attr('string'),
});
Run Code Online (Sandbox Code Playgroud)

在编辑模式下,当我将Adderess 2字段更新为null时,则出现以下错误:

"Failed to edit property: One or more parameter values were invalid: An AttributeValue may not contain an empty string"

我知道这个错误是生成的,因为我将地址2字段更新为null并且我想要的地址2字段不是必需的(可以传递数据或者也可以将该列保留为空白")

amazon-dynamodb

8
推荐指数
2
解决办法
1万
查看次数

如果选中至少一个复选框,应该启用Angular JS + Button如何执行此操作?

我想要一个仅在选中一组复选框中的一个时才启用的按钮,类似于http://jsfiddle.net/chriscoyier/BPhZe/76中的小提琴:

var checkboxes = $("input[type='checkbox']"),
    submitButt = $("input[type='submit']");

checkboxes.click(function() {
    submitButt.attr("disabled", !checkboxes.is(":checked"));
});
Run Code Online (Sandbox Code Playgroud)

我想用AngularJs来实现它.

angularjs

2
推荐指数
1
解决办法
1万
查看次数

如何在Angular 6中从父组件调用子组件的方法

父组件

import { Component } from '@angular/core';
import { ChildComponent }  from './notify.component';

@Component({
    selector: 'my-app',
    template:
    `
    <button (click)="submit()">Call Child Component Method</button>
    `
})
export class AppComponent {
    constructor(private childComp: ChildComponent) { 
    }

    submit(): void {
        // execute child component method
        // This line is compiled properly but at the run time it gives me error related to the static injector## Heading ##
        childComp.callMethod();
    }
}
Run Code Online (Sandbox Code Playgroud)

子组件

import { Component, OnInit } from '@angular/core';

@Component({
    selector: 'child',
    template: '<h3>Child …
Run Code Online (Sandbox Code Playgroud)

typescript angular

1
推荐指数
1
解决办法
5300
查看次数

标签 统计

amazon-dynamodb ×1

angular ×1

angularjs ×1

toastr ×1

typescript ×1