Issue about abort http request on angular.js

Hi. I try to write an interceptor that controls whether internet connection exists or not. If connection does not exist, it shows a message that “You have not connection” and it aborts the http request, else it make an $http request. I show the message, but http request still make a service call. Can I abort http request?
Thanks in advance.