This makes much difference in the minification process. if you are using angular.min.js library then in the production, option A fails. in JSFiddle u might use angular.js lib. That's why both scenarios work.
Check this for more information about minification