That's the point...there is no error showing in the console. On Wednesday, August 5, 2015 at 12:00:56 PM UTC-7, Alain Chautard wrote: > > What error are you getting from the browser console? That's where the > explanation will be found. > > On Wednesday, August 5, 2015 at 11:32:24 AM UTC-7, Michael J. Mahony wrote: >> >> Hi everyone, I have a simple directive that binds the datepicker object. >> I have a working JSFiddle: http://jsfiddle.net/mikemahony/jdz0vvkv/ but >> when I use this same code inside my application nothing happens--no >> datepicker and no errors. Now, I suspect this has to do with scoping >> because I know ng-view creates a child scope. Right now I have this as my >> directive: >> >> JBenchApp.directive('jqdatepicker', function () { >> return { >> restrict: 'A', >> require: 'ngModel', >> link: function (scope, element, attrs, ngModelCtrl) { >> element.datepicker({ >> dateFormat: 'DD, d MM, yy', >> onSelect: function (date) { >> scope.date = date; >> scope.$apply(); >> } >> }); >> } >> }; >> }); >> >> and this is in my view (partial): >> >> <input type="text" ng-model="date" jdatepicker /> >> >> >> >> I suspect that this has to do with the scope. How can I insure that this >> works with the object in the partial? >> >
-- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
