An in situ method is developed for immobilization of nanoscale LDHs.
The universal method can be applied on multiple substrates.
The homogeneous LDHs film can be synthesis and immobilized in one step.
The LDHs film showed good adsorption performance towards anionic compounds.