@@ -528,6 +528,7 @@ dialog component may work.
528528 on-ok="show = false; doSomething()">
529529 Body goes here: {{username}} is {{title}}.
530530 </dialog>
531+ </div>
531532</pre>
532533
533534Clicking on the "show" button will open the dialog. The dialog will have a title, which is
@@ -537,7 +538,7 @@ into the dialog.
537538Here is an example of what the template definition for the `dialog` widget may look like.
538539
539540<pre>
540- <div ng-show="show ">
541+ <div ng-show="visible ">
541542 <h3>{{title}}</h3>
542543 <div class="body" ng-transclude></div>
543544 <div class="footer">
@@ -557,10 +558,10 @@ expects as follows:
557558
558559<pre>
559560 scope: {
560- title: '= ', // set up title to accept data-binding
561+ title: '@ ', // the title uses the data-binding from the parent scope
561562 onOk: '&', // create a delegate onOk function
562563 onCancel: '&', // create a delegate onCancel function
563- show : '='
564+ visible : '=' // set up visible to accept data-binding
564565 }
565566</pre>
566567
@@ -591,11 +592,13 @@ Therefore the final directive definition looks something like this:
591592<pre>
592593transclude: true,
593594scope: {
594- title: '= ', // set up title to accept data-binding
595+ title: '@ ', // the title uses the data-binding from the parent scope
595596 onOk: '&', // create a delegate onOk function
596597 onCancel: '&', // create a delegate onCancel function
597- show: '='
598- }
598+ visible: '=' // set up visible to accept data-binding
599+ },
600+ restrict: 'E',
601+ replace: true
599602</pre>
600603
601604# Creating Components
0 commit comments