Wow. The answer here is huge. But without walking through the process.. the final response is useless.
God created angels to have free will as you stated. With that free will comes the understanding that wrong choices can and probably will be made. To shape context for the remaining reply: God knew wrong could be chosen...but He also knew He could fix it.
First, evil wasn't created. If you accept the postulate "God is good" then obedient creation, always choosing God, will always choose good.
The act of 'not choosing God' would then be what we understand to be 'choosing evil'.
In the garden of eden. Evil (from this point on meaning 'not choosing God ergo Good) had already entered eternity. Not as a created thing but the bi product of rebellion and disobedience.
Man (albeit Adam and Eve) didn't have knowledge of Evil or Good. They only knew God, chose God and hence did good.
God warned them about eating from the tree of the "knowledge of good and evil". God wanted to save His creation for bearing the burden of needing to choose between good and evil. He desired them to only know and only choose Him. However, He also desired willing relationship and not robotic response.
So, He allowed choice. NOT blind choice, they were informed. They knew the consequence and chose to 'know' the difference between good and evil.
To recap. God didn't create Evil. He allowed the choice to follow or reject Him. Rejecting Him equates to 'not choosing good' aptly title Evil.
Not the explaination of the cosmos or anything but I hope this helps your journey.
Good Luck
P.S. There are many belief systems that teach Evil IS a created thing in and of itself. I believe this to be contrary to Biblical truth. again... just my take.