Family-Joining law residence permit

I'm British, which means that for now I'm an EU citizen (till 2019, apparently, so we have to hurry!) and my wife is Danish.  That means she can move to Sweden with no problems, and I should be OK for temporary residence too.

However, we've been told that in this situation it's possible for me to apply for *permanent* residence in advance, and get a final decision before we move.  And we'd much rather do it that way, and know where we stand, than wait till the application after 5 years.  By that time we will have sold our UK house, bought a Swedish place, moved and put down roots... and it would be a disaster if I was turned down.  We'd much rather know now.

The people on the phone at Migrationsverket don't seem to know about this procedure, but they only seem to have been trained to deal with refugees and don't know the rules on EU or Norse citizens.  Does anyone here know if it really exists, and if so, how do we apply?

I agree that them just know to deal with emigrants so the only think is to show to them the laws because they don't understand what is law and how function.They are so stupid,I said it because I had the same experience with them.