With JavaScript, it's best practice to use semicolons after a function expression block:
var myfunction = function() {
alert('hello world');
};
What about in AngularJS, say in a controller, using the dreaded $scope
?
Often times I see these written without semicolons after the closing block:
$scope.myFunction = function() {
alert('hello world');
}
But does anyone know the best practice for this? Will adding a semicolon at the end of these $scope 'expressions' break my AngularJS app? Like so:
$scope.myFunction = function() {
alert('hello world');
};