As can be seen in the picture below ~~
[![enter image description here][1]][1]


What should I do to fix this? ~~
Tried setting Pole Target. The angle got right but the mesh looks wrong when deformed
[![enter image description here][2]][2]
blend file:
[<img src="https://blend-exchange.giantcowfilms.com/embedImage.png?bid=3372" />](https://blend-exchange.giantcowfilms.com/b/3372/)


  [1]: https://i.sstatic.net/NiFAv.jpg
  [2]: https://i.sstatic.net/GxrkE.jpg