Question: uncaught referenceerror app is not defined in angularjs?
Answer: The problem is that you put your controller in a separate file, but forgot to put it in a separate module as well. your app is defined inside anonymous function , so app has the scope within it. try creating a global app variable.