@@ -528,6 +528,7 @@ dialog component may work.
528
528
on-ok="show = false; doSomething()">
529
529
Body goes here: {{username}} is {{title}}.
530
530
</dialog>
531
+ </div>
531
532
</pre>
532
533
533
534
Clicking on the "show" button will open the dialog. The dialog will have a title, which is
@@ -537,7 +538,7 @@ into the dialog.
537
538
Here is an example of what the template definition for the `dialog` widget may look like.
538
539
539
540
<pre>
540
- <div ng-show="show ">
541
+ <div ng-show="visible ">
541
542
<h3>{{title}}</h3>
542
543
<div class="body" ng-transclude></div>
543
544
<div class="footer">
@@ -557,10 +558,10 @@ expects as follows:
557
558
558
559
<pre>
559
560
scope: {
560
- title: '= ', // set up title to accept data-binding
561
+ title: '@ ', // the title uses the data-binding from the parent scope
561
562
onOk: '&', // create a delegate onOk function
562
563
onCancel: '&', // create a delegate onCancel function
563
- show : '='
564
+ visible : '=' // set up visible to accept data-binding
564
565
}
565
566
</pre>
566
567
@@ -591,11 +592,13 @@ Therefore the final directive definition looks something like this:
591
592
<pre>
592
593
transclude: true,
593
594
scope: {
594
- title: '= ', // set up title to accept data-binding
595
+ title: '@ ', // the title uses the data-binding from the parent scope
595
596
onOk: '&', // create a delegate onOk function
596
597
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
599
602
</pre>
600
603
601
604
# Creating Components
0 commit comments