Angular and ngAnnotate, a Better Way

I recently posted to StackOverflow a question and example of how adding a dependency injection to my AngularJS app did not seem to matter regarding my program running correctly.  The answer I got back was clear, but somewhat disconcerting.  Basically, the answer is that Angular takes care of the problem for me in development but when I move to production with minification, it will fail.  Well, that sucks on so many levels. Here is an example of code that shows the problem. angular.module('svccApp', []); angular.module('svccApp'). factory('bareService', [ function() { var myValue = {}; myValue.str1 = 'xyz'; return myValue; } ]); angular.module('svccApp') .controller('MyController', … Continue Reading

AngularJS, the Digest Loop, Directives and jQuery

I've been struggling with understanding when and how to use jQuery inside an AngularJS directive and have the data binding work as expected.  I've got a good example I put together that shows how to do this as well as shows when you need to use the scope.$apply().  As a developer who spends a lot of time working with Microsoft technology, it's become very clear to me that I need to know a lot about AngularJS. AngularJS is a technology that Microsoft (Visual Studio) is pushing as a defacto standard and I'm sure they will have a lot of offerings that either use Angular or are inspired by it. You can see from the below example that in the directive, I am using AngularJS.  Because our DOM is being modified outside of what AngularJS can see, … Continue Reading


Get every new post delivered to your Inbox

Join other followers: