AngularJS - 从 angular-bootstrap-datetimepicker 选择日期时 url 状态从浏览器中删除 URL

AngularJS - On selecting date from angular-bootstrap-datetimepicker url state removing from browser URL

我正在使用 angular-bootstrap-datetimepicker。

点击日期选择器选择日期和时间。

当前状态正在从浏览器中删除 URL。如何解决?

HTML代码

<div class="dropdown">
    <a class="dropdown-toggle" id="startDate" role="button" data-toggle="dropdown" data-target="#" href="#">
        <div class="input-group">
            <input placeholder="{{'START_DATE' | translate}} *" required type="text" class="form-control" data-ng-model="startDate"><span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
        </div>
    </a>
    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
        <datetimepicker data-on-set-time="onStartDateSet(newDate, oldDate)" date-disabled="disableViewFields" data-ng-model="startDate" data-datetimepicker-config="{ dropdownSelector: '#startDate', startView:'day', minView:'hour' }" />
    </ul>
</div>

如果我从标签中删除 href='#',工作正常。代码如下

<div class="dropdown">
<a class="dropdown-toggle" id="startDate" role="button" data-toggle="dropdown" data-target="#">
    <div class="input-group">
        <input placeholder="{{'START_DATE' | translate}} *" required type="text" class="form-control" data-ng-model="startDate"><span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
    </div>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
    <datetimepicker data-on-set-time="onStartDateSet(newDate, oldDate)" date-disabled="disableViewFields" data-ng-model="startDate" data-datetimepicker-config="{ dropdownSelector: '#startDate', startView:'day', minView:'hour' }" />
</ul>