@@ -281,8 +281,9 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) {
281
281
* </hljs>
282
282
*
283
283
* ### JavaScript: promise API syntax, custom dialog template
284
+ *
284
285
* <hljs lang="js">
285
- * (function(angular, undefined){
286
+ * (function(angular, undefined) {
286
287
* "use strict";
287
288
*
288
289
* angular
@@ -297,7 +298,6 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) {
297
298
* var ctrl = this;
298
299
*
299
300
* ctrl.showAlert = showAlert;
300
- * ctrl.closeAlert = closeAlert;
301
301
* ctrl.showGreeting = showCustomGreeting;
302
302
*
303
303
* ctrl.hasAlert = function() { return !!alert };
@@ -312,44 +312,36 @@ function MdDialogDirective($$rAF, $mdTheming, $mdDialog) {
312
312
* .ok('Close');
313
313
*
314
314
* $mdDialog
315
- * .show( alert )
315
+ * .show(alert)
316
316
* .finally(function() {
317
317
* alert = undefined;
318
318
* });
319
319
* }
320
320
*
321
- * // Close the specified dialog instance and resolve with 'finished' flag
322
- * // Normally this is not needed, just use '$mdDialog.hide()' to close
323
- * // the most recent dialog popup.
324
- * function closeAlert() {
325
- * $mdDialog.hide( alert, "finished" );
326
- * alert = undefined;
327
- * }
328
- *
329
321
* // Dialog #2 - Demonstrate more complex dialogs construction and popup.
330
322
*
331
323
* function showCustomGreeting($event) {
332
- * $mdDialog.show({
333
- * targetEvent: $event,
334
- * template:
335
- * '<md-dialog>' +
336
- * ' <md-dialog-content>Hello {{ ctrl.employee }}!</md-dialog-content>' +
337
- * ' <md-dialog-actions>' +
338
- * ' <md-button ng-click="ctrl.closeDialog()" class="md-primary">' +
339
- * ' Close Greeting' +
340
- * ' </md-button>' +
341
- * ' </md-dialog-actions>' +
342
- * '</md-dialog>',
343
- * controller: GreetingController,
344
- * controllerAs: 'ctrl',
345
- * onComplete: afterShowAnimation,
346
- * locals: { employee: ctrl.userName }
347
- * });
324
+ * $mdDialog.show({
325
+ * targetEvent: $event,
326
+ * template:
327
+ * '<md-dialog>' +
328
+ * ' <md-dialog-content>Hello {{ ctrl.employee }}!</md-dialog-content>' +
329
+ * ' <md-dialog-actions>' +
330
+ * ' <md-button ng-click="ctrl.closeDialog()" class="md-primary">' +
331
+ * ' Close Greeting' +
332
+ * ' </md-button>' +
333
+ * ' </md-dialog-actions>' +
334
+ * '</md-dialog>',
335
+ * controller: GreetingController,
336
+ * controllerAs: 'ctrl',
337
+ * onComplete: afterShowAnimation,
338
+ * locals: { employee: ctrl.userName }
339
+ * });
348
340
*
349
- * // When the 'enter' animation finishes...
350
- * function afterShowAnimation(scope, element, options) {
351
- * // post-show code here: DOM element focus, etc.
352
- * }
341
+ * // When the 'enter' animation finishes...
342
+ * function afterShowAnimation(scope, element, options) {
343
+ * // post-show code here: DOM element focus, etc.
344
+ * }
353
345
* }
354
346
* }
355
347
*
0 commit comments