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.
aurelia-rxjs
Advanced tools
An Aurelia plugin that makes it possible bind to Rx Observables and Rx Subjects or use them as Binding Signals.
An Aurelia plugin that allows you to bind to Rx Observables and Rx Subjects or use them as Binding Signals.
aurelia-binding-functions
via jspm
with following commandjspm install npm:aurelia-rxjs npm:aurelia-binding-functions
configure
function in the main.js
file of your src
folder export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging();
+ aurelia.use.plugin('aurelia-binding-functions');
+ aurelia.use.plugin('aurelia-rxjs');
aurelia.start().then(a => a.setRoot());
}
aurelia-rxjs
should be visible automatically.View:
<input value.bind="@rx(twoWayBinding)" autofocus>
<h2>${@rx(counter)}</h2>
<button click.delegate="@rx(onClick)">recompute random</button>
<h2>${random & observableSignal: onClick}</h2>
ViewModel:
import {Observable, Subject, ReplaySubject} from 'rxjs/Rx'
import {computedFrom} from 'aurelia-framework'
export class ObservableExample {
counter = Observable.interval(1000)
twoWayBinding = new ReplaySubject(1)
onClick = new Subject()
constructor() {
this.onClick.subscribe(next => console.log('clicked!'))
this.twoWayBinding.subscribe(next => console.log(`new value: ${next}`))
}
// in this example we want to demonstrate
// regeneration of the value based on the observableSignal
// hence we fool Aurelia into thinking it's computed from 'nothing'
@computedFrom('nothing')
get random() {
return Math.random()
}
}
This library isn't used by Aurelia. It is an optional plugin.
This library can be used in the browser as well as on the server.
To build the code, follow these steps.
npm install
npm install -g gulp
gulp build
You will find the compiled code in the dist
folder, available in three module formats: AMD, CommonJS and ES6.
See gulpfile.js
for other tasks related to generating the docs and linting.
To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:
npm install -g karma-cli
npm install -g jspm
jspm install
karma start
FAQs
An Aurelia plugin that makes it possible bind to Rx Observables and Rx Subjects or use them as Binding Signals.
We found that aurelia-rxjs 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.