
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
buildingblox.directives
Advanced tools
 An angular boilerplate module ------------
BuildingBlox.Directives contains several useful AngularJS directives.
Currently, the module contains a framework for drag-and-drop functionality. It can be used like so:
<div class="dragArea">
The dragArea container is technically not necessary, but it will ensure that touch events
triggered inside do not cause scrolling, but instead will drag elements as expected.
<div class="dropArea" on-drag-enter="enterFunction" on-drag-leave="leaveFunction" on-drop="dropFunction">
When the draggable element enters, leaves, or is dropped into this div, the appropriate event handler function will be called.
</div>
<div class="draggable">
This div will be draggable.
</div>
</div>
A helpful directive implementing this drag-and-drop functionality is included. It is a list whose items can be dragged in order to rearrange, and elements can be dragged from one list into another. It can be used like so:
What a list object might look like:
app.controller('myController', function($scope) {
$scope.myListObject = {
name: 'My List',
list: [
{ _id: 001, value: 'Item 1' },
{ _id: 002, value: 'Item 2' },
]
};
});
What the HTML might look like for the above list object:
<div ng-controller="myController">
<draggable-list ng-model="myListObject" id-property="_id" display-property="value" list-name-property="name" list-property="list"></draggable-list>
</div>
The directive uses the id-property
attribute to determine the unique identifier for each list item,
display-property
for what text to show for each list item,
list-name-property
for what property on the list object should be used as the heading,
and list-property
for what the property on the list object actually refers to the list.
Each of these attributes has a default value, which are the same as those used in the example.
FAQs
 An angular boilerplate module ------------
We found that buildingblox.directives 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.