
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
ng-handsontable
Advanced tools
Enables creation of data grid applications in AngularJS.
See the demo at http://handsontable.github.io/ngHandsontable.
Include the library files:
<link rel="stylesheet" media="screen" href="bower_components/handsontable/dist/handsontable.full.css">
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/handsontable/dist/handsontable.full.js"></script>
<script src="dist/ngHandsontable.js"></script>
Include component to your app:
angular.module('my-app', ['ngHandsontable']);
Template:
<hot-table settings="{colHeaders: colHeaders, contextMenu: ['row_above', 'row_below', 'remove_row'], afterChange: afterChange}"
row-headers="false"
min-spare-rows="minSpareRows"
datarows="db.items"
height="300"
width="700">
<hot-column data="id" title="'ID'"></hot-column>
<hot-column data="name.first" title="'First Name'" type="grayedOut" read-only></hot-column>
<hot-column data="name.last" title="'Last Name'" type="grayedOut" read-only></hot-column>
<hot-column data="address" title="'Address'" width="150"></hot-column>
<hot-column data="product.description" title="'Favorite food'" type="'autocomplete'">
<hot-autocomplete datarows="description in product.options"></hot-autocomplete>
</hot-column>
<hot-column data="price" title="'Price'" type="'numeric'" width="80" format="'$ 0,0.00'"></hot-column>
<hot-column data="isActive" title="'Is active'" type="'checkbox'" width="65" checked-template="'Yes'" unchecked-template="'No'"></hot-column>
</hot-table>
Controller:
$scope.db.items = [
{
"id": 1,
"name": {
"first": "John",
"last": "Schmidt"
},
"address": "45024 France",
"price": 760.41,
"isActive": "Yes",
"product": {
"description": "Fried Potatoes",
"options": [
{
"description": "Fried Potatoes",
"image": "//a248.e.akamai.net/assets.github.com/images/icons/emoji/fries.png"
},
{
"description": "Fried Onions",
"image": "//a248.e.akamai.net/assets.github.com/images/icons/emoji/fries.png"
}
]
}
},
//more items go here
];
Main directive for creating table is <hot-table>
. For defining column options you can use settings object with
columns property. If you want to describe column behavior in declarative way you can add <hot-column>
directive
as a children of <hot-table>
element and add all neccessary attributes to describe column options.
All Handsontable options listed here should be supported.
Options in camelCase mode should be passed to the directive in hyphenate mode e.q autoWrapCol: true
-> <hot-table auto-wrap-col>
.
It's recommended to put all your settings in one big object (settings="ctrl.settings"
).
Settings attribute unlike any other attributes is not watched so using this can be helpful to achieve higher performance.
The MIT License (see the LICENSE file for the full text)
FAQs
AngularJS directive for Handsontable
The npm package ng-handsontable receives a total of 1,136 weekly downloads. As such, ng-handsontable popularity was classified as popular.
We found that ng-handsontable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.