Skip to content

Commit

Permalink
Add demo to keep track of issue #26, can't unit test because relies o…
Browse files Browse the repository at this point in the history
…n IE-specific behavior
  • Loading branch information
cvn committed Jun 18, 2015
1 parent acebe12 commit ac82da2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ <h5>ngAttrPlaceholder</h5>
<input type="password" ng-attr-placeholder="{{test.dynamic_password}}">
</div>

<br>

<div id="group-template" class="group has-placeholder has-model shared-model has-template">
<h5>As template, pre-filled by model</h5>
<span test-template="text"></span>
<span test-template="password"></span>
</div>

</div><!-- /.container -->


Expand Down Expand Up @@ -272,6 +280,16 @@ <h5>ngAttrPlaceholder</h5>

// Force enable polyfill in all browsers for demo
placeholderSniffer.hasPlaceholder = function () { return false; };
})
.directive('testTemplate', function () {
return {
template: function (elem, attrs) {
return '<input type="'+attrs.testTemplate+'" placeholder="'+attrs.testTemplate+'" ng-model="template_text" />';
},
link: function (scope) {
scope.template_text='Hello, Gary';
}
}
});

function fillElements (selector, str) {
Expand Down

0 comments on commit ac82da2

Please sign in to comment.