Package Exports
- @ovh-ux/ng-ovh-doc-url
- @ovh-ux/ng-ovh-doc-url/dist/cjs/index.js
- @ovh-ux/ng-ovh-doc-url/dist/esm/index.js
- @ovh-ux/ng-ovh-doc-url/dist/umd/ng-ovh-doc-url.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ovh-ux/ng-ovh-doc-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ng-ovh-doc-url
Easily create links or get urls to 2api endpoint which redirects to documentation systems (Content manager and docs.ovh.com)
Install
$ yarn add @ovh-ux/ng-ovh-doc-url
Usage
import angular from 'angular';
import ngOvhDocUrl from '@ovh-ux/ng-ovh-doc-url';
angular
.module('myApp', [ngOvhDocUrl])
.config(
/* @ngInject */ (ovhDocUrlProvider, TranslateServiceProvider) => {
// User locale configuration
ovhDocUrlProvider.setUserLocale(TranslateServiceProvider.getUserLocale());
// Url prefix for 2api
ovhDocUrlProvider.setUrlPrefix('/engine/2api');
},
)
.controller(
'MyController',
class {
/* @ngInject */
constructor(ovhDocUrl) {
this.ovhDocUrl = ovhDocUrl;
}
$onInit() {
this.url = this.ovhDocUrl.getDocUrl('g1769.creating_ssh_keys');
}
},
);
<ovh-doc-url data-doc-id="g1769.creating_ssh_keys">My link</ovh-doc-url>
<ovh-doc-url data-doc-id="cloud/dedicated/ovh-ssh-key">My link</ovh-doc-url>
Test
$ yarn test
Contributing
Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.
License
BSD-3-Clause © OVH SAS