CORs for Ionic ? Error for $

I am trying to do a $ to my server. However , i keep getting errors regarding "“Access-Control-Allow-Origin” being missing despite already adding it to my backend.

Instead when i try to do a $http.get , adding “Access-Control-Allow-Origin” header to my backend helped solved the error. However with $, its as if the decleration of the header is entirely ignored.

My question is do i need to add headers to my Ionic Side as well ? And if so, how can i go upon doing that? Thank you

Are you trying to post from localhost to external ip? or localhost to localhost ?

i am trying localhost to localhost