Changed window to \$window in app.js