 <p>Update your controller:</p> <pre><code>var controller = ['$scope',function ($scope) { ... $scope.$on('my-tpl-ready', function() { $('#firstId').datepicker({ format: 'dd-mm-yyyy' }); }); }]; </code></pre> <p>Also add this to your template:</p> <pre><code>&lt;div ... ng-init="$emit('my-tpl-ready')"&gt; ... &lt;/div&gt; </code></pre>