2016-06-26 25 views
-1

Ich bin mit Bootstrap-Timepicker in meinem Winkel js Anwendung, wo ich Routen verwendet haben (ngRoute)Fehler: Knoten ist nicht definiert Bootstrap Timepicker

In einer Seite i die Bootstrap-Timepicker bin mit und es funktioniert ohne Fehler in Ordnung. Aber das selbe, wenn ich in einem popup verwende, (ui-bootstrap), empfange ich den folgenden Fehler.

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 
[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> 

Javascript

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

Modal Popup-Code

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

}); 

Das Timepicker funktioniert in throup aber in der Konsole sehe ich diesen Fehler. Wie löse ich es?

+0

Könnten Sie bitte angeben, welchen Browser Sie verwenden? –

+0

Firefox. Sogar im IE wird der gleiche Fehler geworfen. ist in meinem Layout.cshtml vorhanden – Sanketh

Antwort

0

Try this:

<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> 

Und Javascript

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

Danke. Es funktionierte!. – Sanketh