  We discuss a new strategy for treating the complex action problem of lattice
field theories with a $\theta$-term based on density of states (DoS) methods.
The key ingredient is to use open boundary conditions where the topological
charge is not quantized to integers and the density of states is sufficiently
well behaved such that it can be computed precisely with recently developed DoS
techniques. After a general discussion of the approach and the role of the
boundary conditions, we analyze the method for 2-d U(1) lattice gauge theory
with a $\theta$-term, a model that can be solved in closed form. We show that
in the continuum limit periodic and open boundary conditions describe the same
physics and derive the DoS, demonstrating that only for open boundary
conditions the density is sufficiently well behaved for a numerical evaluation.
We conclude our proof of principle analysis with a small test simulation where
we numerically compute the density and compare it with the analytical result.
