  We propose a valley- and spin-filter based on a normal/ferromagnetic/normal
molybdenum disulfide (MoS$_2$) junction where the polarizations of the valley
and the spin can be inverted by reversing the direction of the exchange field
in the ferromagnetic region. By using a modified Dirac Hamiltonian and the
scattering formalism, we find that the polarizations can be tuned by applying a
gate voltage and changing the exchange field in the structure. We further
demonstrate that the presence of a topological term ($\beta$) in the
Hamiltonian results in an enhancement or a reduction of the charge conductance
depending on the value of the exchange field.
