I've figured the difference between directive template and templateUrl here The load sequence difference between template and templateUrl in angular directive
My question is how to use Angular and Dojo together.
If I place Dojo widget in templateUrl of angular directive,
FamilySnapModule.directive('homePickdata', function() {
return {
restrict: 'EAC',
replace: true,
transclude: true,
templateUrl: 'familysnap/templates/homePickdata.html'
//template: '<div id="calendar_month_datepicker" data-dojo-type="dojox.mobile.SpinWheelDatePicker" data-dojo-props=\'slotOrder: [0,1,2], monthPattern: "MM", dayPattern: "dd", align: "center"\'></div>'
};
});
familysnap/templates/homePickdata.html
<div id="calendar_month_datepicker" data-dojo-type="dojox.mobile.SpinWheelDatePicker" data-dojo-props='slotOrder: [0,1,2], monthPattern: "MM", dayPattern: "dd", align: "center"'></div>
Then
require([
"dojox/mobile/SpinWheelDatePicker",
], function(dom, ready, registry, SpinWheelDatePicker,SwapView) {
registry.byId('calendar_month_datepicker');
}
will return null.
So how to use angular with dojo together?