
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
angular-vdom
Advanced tools
angular wrapper for high performance rendering virtual-dom with the .component() method
angular-vdom allows you to have ultra high performance rendering with virtual-dom components angular 1.5. Under the hood, anguar-vdom takes uses the new .component() lifecycle hooks and works perfectly with stateless components. Live Demo!
angular-vdom uses virtual-dom and main-loop, take a look at the source, it's super straight forward. Why does angular need a virtual-dom implementation? You can check out the performance gains over here. This works great on pages that require huge lists or tables, with 60 FPS scrolling and instant patching
// app.js
var h = require('virtual-dom/h')
var ngVirtualComponent = require('angular-vdom')
var virtualComponent = ngVirtualComponent(render, {bindings: {message: '<'}})
module.exports = require('angular')
.module('app', [])
.component('virtualComponent', virtualComponent)
.name
// Doesn't need to be hyperscript as long as we return a VTree
function render (state) {
return h('div', state.message)
}
// index.html
<div ng-app="app">
<virtual-component message="Hello World!"></virtual-component>
</div>
Usage with ui-router too!
var virtualComponent = ngVirtualComponent(render, {bindings: {message: '<'}})
angular
.module('app', [])
.component('virtualComponent', virtualComponent)
.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('virtual', {
url: '/virtual',
template: '<virtual-component controller-as="vd" message="vd.message"></virtual-component>',
controllerAs: 'vd',
controller: function () {
this.message = 'Hello World'
}
})
}])
angular-vdom exports a function that takes two params:
ngVirtualComponent(render, options)
function that returns a VTree. I use hyperscript but you can use hyperx and even jsx. The render function is called with a state object, that contains your bindings data
Default values for configuring the angular component. When a binded value changes it will trigger an $onChange() event, which will then rAF and render
Just use the attribute
<virtual-component controller-as="vd" message="vd.message"></virtual-component>
npm i && npm run build
cd example/
open index.html
FAQs
angular wrapper for high performance rendering virtual-dom with the .component() method
The npm package angular-vdom receives a total of 4 weekly downloads. As such, angular-vdom popularity was classified as not popular.
We found that angular-vdom 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
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.