Generally speaking, free movement European immigration rights only come about when an EEA national crosses a border into another EEA country.
So, for example, a British citizen living in the UK cannot have any European free movement immigration rights. However, if the British citizen moves to another EEA country (such as Germany) to exercise Treaty rights by working there then they can take advantage of free movement rights, and any non-EEA family members could come to join him/her in Germany.
So, for example, the non-EEA spouse of the British citizen could come to Germany and join the British citizen under European law, and the non-EEA spouse would be issued with an EEA visa by the German authorities.
In such a situation as this it could happen that eventually, the British citizen would want to move back to the UK. The “Surinder Singh” route (which is named after a case in the European Court of Justice) enables the non-EEA spouse to accompany the British citizen back to the UK as their family member under European law; the non-EEA spouse retains the European free movement immigration rights that they acquired outside the UK. This means that non-EEA family member could potentially avoid submitting the application under more stringent UK Immigration Rules, i.e. the earning requirements of £18,600 for spouses and civil partners.
The Court of Justice has also decided more broadly, in related decisions, that where a non-EEA family member of an EEA national wants to enter an EEA country with their EEA family member who is a citizen of that country, and the non-EEA national has a valid EEA visa issued by a different EEA country, then the immigration authorities have to admit them. The immigration authorities cannot require the non-EEA family member to additionally hold an EEA visa issued by them.
So a non-EEA family member of a British citizen who holds a valid EEA visa based on that family relationship, issued by any EEA country, should be able to enter the UK with their British family member or join their British family member in the UK on the basis of that visa.
The approach of the Home Office is however much more complex. EEA Regulations 2016 introduced a number of amendments to the Surinder Singh route, in particular, that the residence in an EEA state was “genuine”.