Recommended reading: Detailed Angularjs modal dialog box
$modal is a service that can quickly create modal windows, creating partial pages, controllers, and associating them.
$modal only one method open (options)
Templateurl: Address of modal window
Template: for displaying HTML tags
Scope: A scope is used for modal content (in fact, $modal creates a child scope for the current scope) defaults to $rootscope
Controller: Initializes the $scope for the controller specified for $modal, which can be injected with $modalinstance
Resolve: Define a member and pass him to the controller specified by $modal, which is equivalent to a reslove attribute of routes, and if you need to pass a Objec object, you need to use Angular.copy ()
Backdrop: Control background, allowed values: True (default), False (no background), "static"-the background is present, but the modal window does not close when you click outside the modal window
Keyboard: When ESC is pressed, the modal dialog box is closed and the default is Ture
Windowclass: Specifies a class and is added to the modal window
The Open method returns a modal instance that has the following properties
Close (results): Closes the modal window and passes a result
Dismiss (reason): Undo modal method and pass a reason
Result: A contract that is passed when the modal window is closed or revoked
Opened: A contract that is passed when the modal window is opened and the content is loaded
In addition, the $modalInstance extends two method $close (result), $dismiss (reason), which easily closes the window and does not require an additional controller
Html
The above is a small series to introduce the Angularjs pop-up modal box (model) related content, I hope to help!