Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit f4f36d0

Browse files
committed
feat(modal): add uib- prefix
1 parent 6158091 commit f4f36d0

File tree

7 files changed

+768
-41
lines changed

7 files changed

+768
-41
lines changed

Diff for: src/modal/docs/demo.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
angular.module('ui.bootstrap.demo').controller('ModalDemoCtrl', function ($scope, $modal, $log) {
1+
angular.module('ui.bootstrap.demo').controller('ModalDemoCtrl', function ($scope, $uibModal, $log) {
22

33
$scope.items = ['item1', 'item2', 'item3'];
44

55
$scope.animationsEnabled = true;
66

77
$scope.open = function (size) {
88

9-
var modalInstance = $modal.open({
9+
var modalInstance = $uibModal.open({
1010
animation: $scope.animationsEnabled,
1111
templateUrl: 'myModalContent.html',
1212
controller: 'ModalInstanceCtrl',
@@ -32,7 +32,7 @@ angular.module('ui.bootstrap.demo').controller('ModalDemoCtrl', function ($scope
3232
});
3333

3434
// Please note that $modalInstance represents a modal window (instance) dependency.
35-
// It is not the same as the $modal service used above.
35+
// It is not the same as the $uibModal service used above.
3636

3737
angular.module('ui.bootstrap.demo').controller('ModalInstanceCtrl', function ($scope, $modalInstance, items) {
3838

Diff for: src/modal/docs/readme.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
`$modal` is a service to quickly create AngularJS-powered modal windows.
1+
`$uibModal` is a service to quickly create AngularJS-powered modal windows.
22
Creating custom modals is straightforward: create a partial view, its controller and reference them when using the service.
33

4-
The `$modal` service has only one method: `open(options)` where available options are like follows:
4+
The `$uibModal` service has only one method: `open(options)` where available options are like follows:
55

66
* `templateUrl` - a path to a template representing modal's content
77
* `template` - inline template representing the modal's content
8-
* `scope` - a scope instance to be used for the modal's content (actually the `$modal` service is going to create a child scope of a provided scope). Defaults to `$rootScope`
8+
* `scope` - a scope instance to be used for the modal's content (actually the `$uibModal` service is going to create a child scope of a provided scope). Defaults to `$rootScope`
99
* `controller` - a controller for a modal instance - it can initialize scope used by modal. Accepts the "controller-as" syntax in the form 'SomeCtrl as myctrl'; can be injected with `$modalInstance`
1010
* `controllerAs` - an alternative to the controller-as syntax, matching the API of directive definitions. Requires the `controller` option to be provided as well
1111
* `bindToController` - when used with `controllerAs` & set to `true`, it will bind the $scope properties onto the controller directly
@@ -20,7 +20,7 @@ The `$modal` service has only one method: `open(options)` where available option
2020
* `size` - optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`
2121
* `openedClass` - class added to the `body` element when the modal is opened. Defaults to `modal-open`
2222

23-
Global defaults may be set for `$modal` via `$modalProvider.options`.
23+
Global defaults may be set for `$uibModal` via `$modalProvider.options`.
2424

2525
The `open` method returns a modal instance, an object with the following properties:
2626

0 commit comments

Comments
 (0)