angular2 bootstrap3下拉错误

时间:2017-07-13 07:33:49

标签: javascript html twitter-bootstrap angular

enter image description here

嗨开发人员,My Angular2项目我尝试bootstrap下拉“Mail”正在运行但是 第二次下拉不起作用

1 个答案:

答案 0 :(得分:1)

以下是嵌套下拉列表的示例。



const groupedByMonthData = {
      "July": [
        {
          "created_at": "2017-07-13 07:23:14",
          "date_from": "2017-07-18 00:00:00",
          "date_to": "2017-07-18 23:59:59",
          "is_new": false
        }
      ],
      "August": [
        {
          "created_at": "2017-07-13 07:24:34",
          "date_from": "2017-08-08 00:00:00",
          "date_to": "2017-08-09 23:59:59",
          "is_new": true
        }
      ]
    }

    let hasIsNew = Object.keys(groupedByMonthData).map( month => 
       groupedByMonthData[month].some( obj => obj.is_new ) )
  console.log(hasIsNew.join("\n"));

$('.dropdown-submenu a.test').on("click", function(e){
    $(this).next('ul').toggle();
    e.stopPropagation();
    e.preventDefault();
  });