ng-jsyaml
v0.0.3
Published
AngularJS wrapper for js-yaml package
Downloads
19
Readme
ng-jsyaml
AngularJS wrapper for js-yaml package
This is just a package which allows using js-yaml in the AngularJS way.
Installation
NPM
npm install --save ng-jsyaml
Yarn
yarn add ng-jsyaml
Bower
bower install --save ng-jsyaml
Usage
...
<script src="path/to/js-yaml/dist/js-yaml.js"></script>
<script src="path/to/ng-jsyaml/angular-jsyaml.js"></script>
...
- Add dependency to AngularJS module
angular.module('your-app', ['ng-jsyaml']);
- Inject
yaml
service and voila!
angular.module('your-app')
.controller('YourController', YourController)
YourController.$inject = ['yaml']
function YourController(yaml) {
// your awesome code
// use yaml here
// more of your awesome code
}