@@ -80,7 +80,7 @@ The **normalization** process is as follows:
8080
8181For example, the following forms are all equivalent and match the {@link ngBind} directive:
8282
83- <example module="docsBindExample">
83+ <example module="docsBindExample" name="directive-bind" >
8484 <file name="index.html">
8585 <div ng-controller="Controller">
8686 Hello <input ng-model='name'> <hr/>
@@ -185,7 +185,7 @@ several others. This is a good opportunity to use a directive to simplify your t
185185
186186Let's create a directive that simply replaces its contents with a static template:
187187
188- <example module="docsSimpleDirective">
188+ <example module="docsSimpleDirective" name="directive-simple" >
189189 <file name="script.js">
190190 angular.module('docsSimpleDirective', [])
191191 .controller('Controller', ['$scope', function($scope) {
@@ -224,7 +224,7 @@ its own HTML file and load it with the `templateUrl` option.
224224If you are familiar with `ngInclude`, `templateUrl` works just like it. Here's the same example
225225using `templateUrl` instead:
226226
227- <example module="docsTemplateUrlDirective">
227+ <example module="docsTemplateUrlDirective" name="directive-template-url" >
228228 <file name="script.js">
229229 angular.module('docsTemplateUrlDirective', [])
230230 .controller('Controller', ['$scope', function($scope) {
@@ -258,7 +258,7 @@ element that the directive was called on, and an `attr` object associated with t
258258function, since the template is requested before the scope is initialized.
259259</div>
260260
261- <example module="docsTemplateUrlDirective">
261+ <example module="docsTemplateUrlDirective" name="directive-template-url-fn" >
262262 <file name="script.js">
263263 angular.module('docsTemplateUrlDirective', [])
264264 .controller('Controller', ['$scope', function($scope) {
@@ -307,7 +307,7 @@ These restrictions can all be combined as needed:
307307
308308Let's change our directive to use `restrict: 'E'`:
309309
310- <example module="docsRestrictDirective">
310+ <example module="docsRestrictDirective" name="directive-restrict" >
311311 <file name="script.js">
312312 angular.module('docsRestrictDirective', [])
313313 .controller('Controller', ['$scope', function($scope) {
@@ -363,7 +363,7 @@ given scope.
363363In its current implementation, we'd need to create a different controller each time in order to
364364re-use such a directive:
365365
366- <example module="docsScopeProblemExample">
366+ <example module="docsScopeProblemExample" name="directive-scope-problem" >
367367 <file name="script.js">
368368 angular.module('docsScopeProblemExample', [])
369369 .controller('NaomiController', ['$scope', function($scope) {
@@ -405,7 +405,7 @@ What we want to be able to do is separate the scope inside a directive from the
405405outside, and then map the outer scope to a directive's inner scope. We can do this by creating what
406406we call an **isolate scope**. To do this, we can use a {@link $compile#-scope- directive's `scope`} option:
407407
408- <example module="docsIsolateScopeDirective">
408+ <example module="docsIsolateScopeDirective" name="directive-isolate" >
409409 <file name="script.js">
410410 angular.module('docsIsolateScopeDirective', [])
411411 .controller('Controller', ['$scope', function($scope) {
@@ -478,7 +478,7 @@ scope has another effect.
478478We can show this by adding another property, `vojta`, to our scope and trying to access it from
479479within our directive's template:
480480
481- <example module="docsIsolationExample">
481+ <example module="docsIsolationExample" name="directive-isolate-2" >
482482 <file name="script.js">
483483 angular.module('docsIsolationExample', [])
484484 .controller('Controller', ['$scope', function($scope) {
@@ -557,7 +557,7 @@ to call a handler on a regular basis. This is easier than using `$timeout` but a
557557end-to-end testing, where we want to ensure that all `$timeout`s have completed before completing the test.
558558We also want to remove the `$interval` if the directive is deleted so we don't introduce a memory leak.
559559
560- <example module="docsTimeDirective">
560+ <example module="docsTimeDirective" name="directive-link" >
561561 <file name="script.js">
562562 angular.module('docsTimeDirective', [])
563563 .controller('Controller', ['$scope', function($scope) {
@@ -633,7 +633,7 @@ wrap any arbitrary content.
633633
634634To do this, we need to use the `transclude` option.
635635
636- <example module="docsTransclusionDirective">
636+ <example module="docsTransclusionDirective" name="directive-transclude" >
637637 <file name="script.js">
638638 angular.module('docsTransclusionDirective', [])
639639 .controller('Controller', ['$scope', function($scope) {
@@ -664,7 +664,7 @@ this option have access to the scope **outside** of the directive rather than in
664664To illustrate this, see the example below. Notice that we've added a `link` function in `script.js`
665665that redefines `name` as `Jeff`. What do you think the `{{name}}` binding will resolve to now?
666666
667- <example module="docsTransclusionExample">
667+ <example module="docsTransclusionExample" name="directive-transclusion" >
668668 <file name="script.js">
669669 angular.module('docsTransclusionExample', [])
670670 .controller('Controller', ['$scope', function($scope) {
@@ -714,7 +714,7 @@ arbitrary content.
714714Next, we want to add buttons to this dialog box, and allow someone using the directive to bind their
715715own behavior to it.
716716
717- <example module="docsIsoFnBindExample">
717+ <example module="docsIsoFnBindExample" name="directive-transclusion-scope" >
718718 <file name="script.js">
719719 angular.module('docsIsoFnBindExample', [])
720720 .controller('Controller', ['$scope', '$timeout', function($scope, $timeout) {
@@ -791,7 +791,7 @@ its elements.
791791For instance, what if we wanted to create a directive that lets a user drag an
792792element?
793793
794- <example module="dragModule">
794+ <example module="dragModule" name="directive-drag" >
795795 <file name="script.js">
796796 angular.module('dragModule', [])
797797 .directive('myDraggable', ['$document', function($document) {
@@ -848,7 +848,7 @@ Sometimes, you want a component that's built from a combination of directives.
848848Imagine you want to have a container with tabs in which the contents of the container correspond
849849to which tab is active.
850850
851- <example module="docsTabsExample">
851+ <example module="docsTabsExample" name="directive-tabs" >
852852 <file name="script.js">
853853 angular.module('docsTabsExample', [])
854854 .directive('myTabs', function() {
0 commit comments