GitHub_angular.js: 7765

Illustration of comment to https://github.com/angular/angular.js/issues/7765.

by ExpertSystem

HTML

<script src="http://code.angularjs.org/1.3.0-rc.0/angular.min.js"></script>
<div ng-controller="mainCtrl">
    <button ng-click="is_autoplay=undefined">
        is_autolay = undefined
    </button>
    <button ng-click="is_autoplay=''">
        is_autoplay = ''
    </button>
    <hr />
    <div ng-attr-autoplay="{{is_autoplay}}">Inspect me !</div>
</div>

<!-- -=-=-=-=- -=[IGNORE BELOW THIS LINE]=- -=-=-=-=- -->
<!-- Page Footer -->
<small class="footer" ng-controller="footerCtrl">
    <b>Angular v{{version.full}}</b> ({{version.codeName}})
    <span class="right">
        &copy; <a ng-href="{{authorUrl}}" target="_blank">ExpertSystem</a>
    </span>
</small>

CSS

/* -=-=-=-=- -=[IGNORE BELOW THIS LINE]=- -=-=-=-=- */
/* Page Footer */
body { padding-bottom: 22px; }
.footer { background-color: White; border-top: 1px solid rgba(100, 100, 100, 0.33); bottom: 0; display: block; font-size: 0.75em; height: 20px; left: 0; margin: 0 5px; overflow: auto; padding: 5px; position: fixed; right: 0; }
.right { float: right; }

JavaScript

var app = angular.module('myApp', []);
app.controller('mainCtrl', function ($scope) {});

/* -=-=-=-=- -=[IGNORE BELOW THIS LINE]=- -=-=-=-=- */
/* Page Footer */
app.controller('footerCtrl', function ($scope) {
    $scope.authorUrl = '//stackoverflow.com/users/2341938/expertsystem';
    $scope.version   = angular.version;
});