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

Using Gulp to Build My JavaScript AngularJS App

Having spent the past few hours learning how Gulp works, and finally customizing it for my scenario, I feel the need to share.  As I was figuring it out, it seems that many have had my thought also.  So, for those not acquainted with Gulp, basically, it's  is a build system of sorts that works with Node.JS. It's got a huge community of tasks that you can use and pipeline together. Basically, here is what my gulpfile.js does: Compiles my SASS (scss) into both expanded and minified CSS Runs jshint on all my JavaScript Concatinates all my JavaScript together and makes both minified and non-minified versions of it Optimizes my images Copies my AngularJS web templates to a production directory Copies my JSON files to a … Continue Reading

ExtJS 5 Bind ViewModel To Template

The simplest things can often be aggravating to get right.  I often find that when something does not work (especially in ExtJS 5 using View Model and Bind) that I need to make the simplest example to prove my understanding to myself.  I thought I would share a very simple yet powerful example of how to bind data from a ViewModel to an xtemplate in ExtJS 5. There are many other things you can do with databinding including modeling selected row in a grid as well as nice integration with formulas.  The below example is just a very simple case that proves it works which is often all I need. Notice that in the code below I’ve created a very simple viewport with just one item.  The two big takeaways are: The data must be … Continue Reading

A Simple Prompt Modal Dialog for JQuery JavaScript

Do you hate what the basic alert(‘hello there’) looks like in JavaScript to your viewing public?  All I want is a simple modal prompt dialog that works with JQuery.   For a long time, I’ve been looking for a simple to use replacement.  It seems like when I scour the internet, I run into lots of people telling you simple ways to use JQueryUI’s Dialog.  For example, when you search “jquery alert simple” you get tons of hits.  This one: It seems the highest voted one says do this: $("<div>My div content</div>").dialog(); Way down in the comments of the SO post, zod posts “What about prompt” with a links … Continue Reading


Get every new post delivered to your Inbox

Join other followers: