ngAttrs Example

Try edit me.
Toggle Editable Status (contenteditable)
Toggle Dark Mode (dark-mode)

Usage

angular.module('yourApp', ['ngAttrs'])

<body ng-app="yourApp">
  <div ng-controller="yourCtrl">
    <div ng-attrs="{ contenteditable: isEditable, 'custom-attr': isCustomAttr }"></div>
  </div>
</body>
        
Fork me on GitHub