---
order: 10
title:
  zh-CN: 服务方式创建
  en-US: Modal's service
---

## zh-CN

Modal的service用法，示例中演示了用户自定义模板、自定义component、以及注入模态框实例的方法。

使用模版作为内容时上下文为 ` { $implicit: nzComponentParams, modalRef: NzModalRef }`

## en-US

Usage of Modal's service, examples demonstrate user-defined templates, custom components, and methods for injecting modal instances.

The template context is ` { $implicit: nzComponentParams, modalRef: NzModalRef }` when the content is templates.
