Oleg Omelchenko Oleg Omelchenko - 1 month ago 17
AngularJS Question

AngularJS app initializes but doesn't work

I have started a pet project with AngularJS and Gulp. The code is available on github.

After building the project my

dist
folder looks like this:

js/
--vendor.js
--app.js
index.html


When I run browserSync in
dist
folder, everything seems to work fine: the paths are injected correctly,
angular
global variable is available in chrome console, and ng-app directive is on its place. However, if I try to create a controller or config an app, the scripts inside the functions don't run.

That's the first time when I actually wrote
gulpfile.js
entirely by myself, based on various tutorials. I suspect that the problem may be in improper gulp configuration, but I'm not sure.

Answer

in index.html change ng-app to ng-app="app" add browser-sync in dependencies. other than that everything is fine.