Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ng-node-compile
Advanced tools
Compile html templates the angular way, in node js! this is a pretty new package, so don't hesitate adding issues or pull requests!
new ngcompile().$interpolate("hello {{name}}")({ name: 'Jhon doe' });
$ npm install ng-node-compile
The library exposes several angular services, which will let you compile angular templates inside node:
###ngcompile this is the function to create a angular enviorment. just
var ngEnviorment = new ngcompile([modules],[angularPath]);
arguments:
modules: optional. list of modules to inject to angular enviorment
angularPath: optional. path to angular.js file, in case you want another angular version.
###$interpolate:
var ngcompile = require('ng-node-compile');
var ngEnviorment = new ngcompile();
ngEnviorment.$interpolate("hello {{name}}")({ name: 'Jhon doe' });
this wil return a string "hello Jhon doe"
###$compile:
var ngcompile = require('ng-node-compile');
var ngEnviorment = new ngcompile();
ngEnviorment.$compile("<div ng-repeat=\"n in [1,2,3,4,5]\">hello {{name}} {{n}}</div>")({ name: 'Jhon doe' });
this wil return the following HTML:
<div ng-repeat="n in [1,2,3,4,5]" class="ng-binding ng-scope">hello Jhon doe 1</div>
<div ng-repeat="n in [1,2,3,4,5]" class="ng-binding ng-scope">hello Jhon doe 2</div>
<div ng-repeat="n in [1,2,3,4,5]" class="ng-binding ng-scope">hello Jhon doe 3</div>
<div ng-repeat="n in [1,2,3,4,5]" class="ng-binding ng-scope">hello Jhon doe 4</div>
<div ng-repeat="n in [1,2,3,4,5]" class="ng-binding ng-scope">hello Jhon doe 5</div>
FAQs
Compile angular templates, on Server side!
The npm package ng-node-compile receives a total of 50 weekly downloads. As such, ng-node-compile popularity was classified as not popular.
We found that ng-node-compile 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.