Javascript 使用引导时间选择器时,未更新数据ng模型值

Javascript 使用引导时间选择器时,未更新数据ng模型值,javascript,angularjs,twitter-bootstrap,Javascript,Angularjs,Twitter Bootstrap,我从时间选择器中选择的值没有更新,但是当我删除时间选择器并使用普通文本框更新时,时间选择器或我的代码有什么问题 <div data-ng-repeat="mondayBhr in businessHour.mon" class="form-group"> <label class="col-sm-1 label-group" for="mondayStoreOpentimingsedit">Open</label>

我从时间选择器中选择的值没有更新,但是当我删除时间选择器并使用普通文本框更新时,时间选择器或我的代码有什么问题

<div  data-ng-repeat="mondayBhr in businessHour.mon" class="form-group">
            <label class="col-sm-1 label-group" for="mondayStoreOpentimingsedit">Open</label>
            <div class="form-group">
                <div class="bootstrap-timepicker">
                    <input  id="mondayStoreOpentimingsedit" name="mondayStoreOpentimingsedit" ng-model="mondayBhr.store[0].open"  style="max-height:25px" class="col-md-2"  />
                    <script>
                        $('#mondayStoreOpentimingsedit').timepicker({
                            showMinutes:true,
                            showMeridian:false,
                            pick12HourFormat: true
                        }).next().on(ace.click_event, function(){
                            $(this).prev().focus();
                        });
                        </script>
                </div>
            </div>
        </div>

打开
$(“#mondayStoreOpentimingsedit”)。时间选择器({
是的,
子午线:错,
pick12HourFormat:true
}).next().on(ace.click_事件,函数(){
$(this.prev().focus();
});

非常感谢您事先的帮助

在使用jquery插件与AngularJS交互时始终使用指令

标记

<input  id="mondayStoreOpentimingsedit" time-picker name="mondayStoreOpentimingsedit" 
ng-model="mondayBhr.store[0].open" style="max-height:25px" class="col-md-2"  />

你查过我的答案了吗?这很有道理!!但是我需要为所有的日子生成时间选择器,动态的,通过指令可以吗。。。我是新来的。。但是没有使用directivesyeah..您可以为htm中的每个元素初始化不同的时间选择器。查看我的更新您只需要在元素标记内添加
时间选择器
属性是的,我看到了!!我需要试试。我可以通过评论让你知道我对这篇文章的怀疑。。
app.directive('timePicker', function() {
    return {
        restrict: 'A',
        reuqire: 'ngModel',
        link: function(scope, element, attrs, ngModel) {
            element.timepicker({
                showMinutes: true,
                showMeridian: false,
                pick12HourFormat: true,
                change: function(time) {
                    //need to run digest cycle for applying bindings
                    scope.$apply(function() {
                        ngModel.$setViewValue(time);
                    });

                }
            }).next().on(ace.click_event, function() {
                $(this).prev().focus();
            });
        }
    }
});