I found these words while watching anime. What is the difference of the usage of these words (danga and iya') as both of them seems to mean(in english): however or but.

I might be wrong though