![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ee-bind-attr
Advanced tools
The missing ngBindAttrs with a bit of safety.
This package is currently in-development. Feel free to use it but note that it may have bugs and it may not provide the functionality you need. See the known limitations section.
Use bower:
bower install ee-bind-attr
or npm:
bower install --save ee-bind-attr
This module provides an attribute directive which gives the user similar possibilities as the deprecated ngBindAttr
(with slightly modified syntax).
(see the note on security)
angular
.module('myApp', [
'eeBindAttr',
])
.config(function (eeBindAttrProvider) {
eeBindAttrProvider
.setWhitelist('whitelistName', {
a: ['download', 'title'],
})
.setWhitelist('anotherMoreRestrictiveWhitelistName', {
a: ['download'],
});
})
this.attributes = {
download: 'file-name.zip',
title: 'Download the file',
};
<div ng-controller="myCtrl as ctrl">
<!-- both attributes will be bound -->
<a ee-bind-attr="{whitelist: 'whitelistName', attrs: ctrl.attributes}">My link</a>
<!-- only `download` will be bound -->
<a ee-bind-attr="{whitelist: 'anotherMoreRestrictiveWhitelistName', attrs: ctrl.attributes}">My link</a>
<!-- no attribute will be bound -->
<button ee-bind-attr="{whitelist: 'whitelistName', attrs: ctrl.attributes}">My button</button>
</div>
ngBindAttr
was a core AngularJS directive once, but
it has been removed in favor of
ngAttr attribute bindings.
The "new way" has one drawback: one has to know in advance which attributes are to be added to the element. This reduces
the flexibility ngBindAttr
gave.
The aim of this project is to allow to use the old ngBindAttr
syntax where ngAttr
is not enough.
To ensure security only whitelisted attributes can be added to the element. Attributes are whitelisted on per-element
basis. This means one can allow download
attribute on a
elements but if it's not whitelisted then download
attribute won't be set on the a
element even though it's present in the
The watch functionality ngBindAttr
had is not re-created yet. THis means that:
eeBindAttr
on need to be known in advance, before the
element is createdFAQs
The missing ngBindAttrs with a bit of safety.
The npm package ee-bind-attr receives a total of 2 weekly downloads. As such, ee-bind-attr popularity was classified as not popular.
We found that ee-bind-attr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.