If you have loaded the common.js
script, you can just call the function like you would normally. It appears to be global..
if (scope.signup_form.$dirty && scope.signup_form.$invalid) {
showAlert('some value');
}
You can load your script as normal in your html: <script src="path/to/common.js"></script>
Also, I'm hoping that's just an example.. It doesn't make a lot of sense to wrap alert()
by itself. You could just call alert()
directly and not need the external function.