I was playing around with this and I realized an alternative maybe to use getter methods for these scope variables that need to fallback to default values if undefined.

E.g.
`getCloseText: function () { return scope.closeText || datepickerPopupConfig.closeText }`

Of course, they can be shortened and generalized if they're the same keys on the scope and config objects.

Just a suggestion / thought.