Made modal popup correctly using angular rather than jquery