Using the ng-click
directive to get a click event on a link would look something like:
<a ng-click="call('home')" href="#" title="ir para homepage">Home</a>
But would not this be the same as using onclick="call('home')"
?
Is not a good practice in web development to separate each document with its proper functionality? Avoiding that lot of CSS and Javascript inline ?
Is it possible, for example, to select an element similar to the known $('foo').on('click', function(){});
i.e can access the element of the JavaScript file and without filling the HTML
of policies?
For example:
<a ng-model='abrir' href='#'>Abrir</a>
And in JS:
$scope.abrir.on('click', function(){
call('foo');
});