Tensor Network States, Entanglement, and Anomalies of Topological Phases of Matters