js_scaffold improved to handle angularjs module dependencies