I am attempting to learn angular.js and have seen a few different ways to initialize the module and controller.
here is how i found to do it through debugging one site I have been using as a guide.
var myApp = angular.module("myApp", []);
myApp.controller("myController", myController);
function myController($scope) {
//some code
}
and her is a way I have seen it done on a few different tutorials
angular.moudule('myApp', []).controller('myController', function($scope){
//some code
}
I understand that this may be a personal preference but I would like to know if there is a preferred way or a cleaner way to do it. Also if there is a better way to do please mention that as well.