China's parliament has approved a controversial national security law for Hong Kong that bypasses Hong Kong's legislature.