title: Angularjs datepicker popup bootstrap-ui does not work in view
body: <p>I am an angularjs and bootstrap ui newbie!
  My date picker popup is not working in my included view. It works if its outside the view. 
  i.e. as demoed here Any assistance will be appreciated. But, because I am using the ngRoute approach, I need to compose my view in the partial html and include in the main index.html.
  The inline calendar does not show and the popup calendar does not show as well. I cannot figure out the problem, but I think the date-picker.html cannot reference the script and style in my index.html. I have other included pane in the date-picker hmtl which references the scripts and css in the index.html fine. 
  Any assistance will be appreciated.
  Below is the code:</p>
  
  <p><em><strong></em>**index.html*<em>*</em></strong></p>
  
  <pre><code>    &lt;!doctype html&gt;
      &lt;html lang="en" ng-app="ngdemo"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;title&gt;Some Services&lt;/title&gt;
          &lt;link rel="stylesheet" href="css/app.css"/&gt;
          &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.js"&gt;&lt;/script&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular-route.min.js"&gt;&lt;/script&gt;   
          &lt;script src="js/app.js"&gt;&lt;/script&gt;
          &lt;script src="js/services.js"&gt;&lt;/script&gt;
          &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
          &lt;script src="js/filters.js"&gt;&lt;/script&gt;
          &lt;script src="js/directives.js"&gt;&lt;/script&gt;
          &lt;script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"&gt;&lt;/script&gt;
          &lt;link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"&gt;
  
      &lt;/head&gt;
  
      &lt;body&gt;
  
  &lt;ul class="menu"&gt;
      &lt;li&gt;&lt;a href="#/date-picker"&gt; &lt;b&gt; Date Management &lt;/b&gt; &lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
  
      &lt;div ng-view&gt;&lt;/div&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p><em><strong></em>* app.js <em>*</em></strong></p>
  
  <pre><code>'use strict';
  
  // Declare app level module which depends on filters, and services
  angular.module('ngdemo', ['ngRoute','ngdemo.filters','ngdemo.services', 'ngdemo.directives', 'ngdemo.controllers']).
      config(['$routeProvider', function ($routeProvider) {
          $routeProvider.when('/date-picker', {templateUrl: 'partials/datepicker.html', controller: 'MixedContentCtrl'});
          $routeProvider.otherwise({redirectTo: '/date-picker'});
      }]);
  </code></pre>
  
  <p><em><strong></em></strong> controller.js <strong><em>*</em></strong></p>
  
  <pre><code>'use strict';
  
  /* Controllers */
  
  var app = angular.module('ngdemo.controllers',['ui.bootstrap']);
  
  
  //Clear browser cache (in development mode)
  
  //http://stackoverflow.com/questions/14718826/angularjs-disable-partial-caching-on-dev-machine
  app.run(function ($rootScope, $templateCache) {
      $rootScope.$on('$viewContentLoaded', function () {
          $templateCache.removeAll();
      });
  });
  
  var DatepickerDemoCtrl = function ($scope) {
    $scope.today = function() {
      $scope.dt = new Date();
    };
    $scope.today();
  
    $scope.showWeeks = true;
    $scope.toggleWeeks = function () {
      $scope.showWeeks = ! $scope.showWeeks;
    };
  
    $scope.clear = function () {
      $scope.dt = null;
    };
  
    // Disable weekend selection
    $scope.disabled = function(date, mode) {
      return ( mode === 'day' &amp;&amp; ( date.getDay() === 0 || date.getDay() === 6 ) );
    };
  
    $scope.toggleMin = function() {
      $scope.minDate = ( $scope.minDate ) ? null : new Date();
    };
    $scope.toggleMin();
  
    $scope.open = function($event) {
      $event.preventDefault();
      $event.stopPropagation();
  
      $scope.opened = true;
    };
  
    $scope.dateOptions = {
      'year-format': "'yy'",
      'starting-day': 1
    };
  
    $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'shortDate'];
    $scope.format = $scope.formats[0];
  };
  </code></pre>
  
  <p><em><strong></em> datepicker.html **</strong> </p>
  
  <pre><code>&lt;div ng-controller="DatepickerDemoCtrl"&gt;
      &lt;pre&gt;Selected date is: &lt;em&gt;{{dt | date:'fullDate' }}&lt;/em&gt;&lt;/pre&gt;
  
      &lt;h4&gt;Inline&lt;/h4&gt;
      &lt;div style="display:inline-block; min-height:290px;"&gt;
        &lt;div class="well well-sm" ng-model="dt"&gt;
            &lt;datepicker min="minDate" show-weeks="showWeeks"&gt;&lt;/datepicker&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;h4&gt;Popup&lt;/h4&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6"&gt;
              &lt;p class="input-group"&gt;
                &lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min="minDate" max="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" /&gt;
                &lt;span class="input-group-btn"&gt;
                  &lt;button class="btn btn-default" ng-click="open($event)"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/button&gt;
                &lt;/span&gt;
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-6"&gt;
              &lt;label&gt;Format:&lt;/label&gt; &lt;select class="form-control" ng-model="format" ng-options="f for f in formats"&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;hr /&gt;
      &lt;button class="btn btn-sm btn-info" ng-click="today()"&gt;Today&lt;/button&gt;
      &lt;button class="btn btn-sm btn-default" ng-click="dt = '2009-08-24'"&gt;2009-08-24&lt;/button&gt;
      &lt;button class="btn btn-sm btn-success" ng-click="toggleWeeks()" tooltip="For inline datepicker"&gt;Toggle Weeks&lt;/button&gt;
      &lt;button class="btn btn-sm btn-danger" ng-click="clear()"&gt;Clear&lt;/button&gt;
      &lt;button class="btn btn-sm btn-default" ng-click="toggleMin()" tooltip="After today restriction"&gt;Min date&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>