2016-06-26 9 views
-1

あり、それはエラーなしで正常に動作します。しかし、私がポップアップ(ui-bootstrap)で使うときと同じ、私は次のエラーを受け取ります。エラー:ノードは、私は、ブートストラップtimepickerを使用しています1ページでは、私はルートを使用している私の角度のjsアプリケーション(ngRoute)</p> <p>にブートストラップtimepickerを使用しています未定義のブートストラップtimepicker

Error: node is undefined 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8462:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8339:30 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8677:16 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8476:16 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:9206:20 
[email protected]://localhost:7084/Scripts/lib/bootstrap/ui-bootstrap-tpls.js:3678:9 
bind/<@http://localhost:7084/Scripts/lib/angular/angular.js:1266:15 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:9757:9 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:9156:11 
compo[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8459:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:9151:24 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:8459:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:9151:24 
compileTemplateUrl/<@http://localhost:7084/Scripts/lib/angular/angular.js:9496:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:16104:28 
scheduleProcessQueue/<@http://localhost:7084/Scripts/lib/angular/angular.js:16120:27 
$RootScopeProvider/this.$get</[email protected]://localhost:7084/Scripts/lib/angular/angular.js:17378:16 
$RootScopeProvider/this.$get</[email protected]://localhost:7084/Scripts/lib/angular/angular.js:17191:15 
$RootScopeProvider/this.$get</[email protected]://localhost:7084/Scripts/lib/angular/angular.js:17486:13 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:11637:36 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:11843:7 
[email protected]://localhost:7084/Scripts/lib/angular/angular.js:11776:9 
<div class="modal-content" uib-modal-transclude=""> 

CSHTML

<div class="bootstrap-timepicker"> 
    <div class="form-group"> 
    <div class="input-group"> 
     <input type="text" id="txtTime" class="form-control timepicker"> 
     <div class="input-group-addon"> 
     <i class="fa fa-clock-o"></i> 
     </div> 
    </div> 
    </div> 
</div> 

ジャバスクリプト

$(function() { 
    $(".timepicker").timepicker({ showInputs: false });  
}); 

モーダルポップアップコード

$uibModal.open({  
animation: true, 
templateUrl: /Controller/Action, 
controllerAs: somename, 
controller: somecontroller, 
backdrop: static, 
keyboard: true, 
size: null 

}); 

timepickerはthr poupで動作しますが、コンソールにこのエラーが表示されます。 どうすれば解決できますか?

+0

は、あなたが使用しているブラウザを指定していただけますか? –

+0

Firefox。 IEでも同じエラーがスローされます。 はLayout.cshtmlにあります – Sanketh

答えて

0

はこれを試してみてください:

<div class="input-group bootstrap-timepicker timepicker"> 
      <input id="timepicker1" type="text" class="form-control input-small"> 
      <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span> 
     </div> 

そしてjavascriptの

$(function() { 
$("#timepicker1").timepicker({ showInputs: false });  
}); 
+0

ありがとうございます。出来た!。 – Sanketh

関連する問題