I was reading the docs on angular 1.3, was this controller syntax removed?? do I now have to use
var app = module("myModule", []);
app.controller("AppCtrl", function(){});
I was reading the docs on angular 1.3, was this controller syntax removed?? do I now have to use
var app = module("myModule", []);
app.controller("AppCtrl", function(){});
In Angular 1.3 this syntax was removed. The reason for that is to enforce the user to use Getters instead of a settetrs.
Setter(you are setting the module):
angular.module('app', []);
Getter - you are getting the module
angular.module('app');
so when assigning the setter module to a variable you are always calling to the setter method which may cause variable collisions and leaks. And it makes your code much less cleaner.
As long as you will stick to the 1 component per file there should no be a problem to use the following syntax:
angular
.module('app')
.controller('SomeController' , function(){});