Closed morsdyce closed 9 years ago
:+1:
I created an NPM package.
npm install angular-wamp
Can you give it a try and let me know if it works?
I'm not 100% sure how that'll fit into your workflow, so any instructions you can provide for others would be much appreciated.
Hey David,
It did not work, but I created a pull request to do the necessary changes. Pull request: https://github.com/voryx/angular-wamp/pull/30
Regarding the use case for the workflow instead of including the scripts into the page by hand you can do the following:
npm install angular-wamp
import angular from 'angular';
import angularWamp from 'angular-wamp';
// module definition
export default angular.module('app.starter', [angularWamp])
.config(function($wampProvider) {
$wampProvider.init({
url: 'ws://127.0.0.1:9000/',
realm: 'realm1'
//Any other AutobahnJS options
});
})
.run(function($wamp){
$wamp.open();
});
angular.bootstrap(document, ['app.starter']);
This also takes care of requiring autobahn and there is no need to include it manually.
I'd appreciate if you could merge the pull request and update the npm package.
Thanks
I would appreciate if you could publish this package to npm for alternative workflows such as browserify and webpack