Controller shouldn't know about layout, I agree.
I think it depends on the type of your app.
If we're talking about 'forms' I believe you should go in using some sort of 'auto-generating' layout; I usually have some templates, partials and directives that create the form starting from an object like:
var form = [
{ name : "username", type : "text", required : true },
{ name : "password", type : "password", required : true },
{ name : "login", type : "button", onClick : $scope.loginHandler }
];
So it's not a problem: it's the directive/partial/whatever that manages button-types that do the right thing binding the onClick
function to the right event.
But if your app is actually using a complex layout and you can't rely on something "autogenerated", the right way to bind it is specifying the handle function inside ng-click
of every element/group of elements. That doesn't mean that the controller 'knows' about the layout: it's the layout that knows about the controller.
Or you can mix jQuery with Angularjs; I don't like this approach and I think there are better ways, but it's always an option.
PS: sorry for my english.