Easily create links or get urls to 2api endpoint which redirects to documentation systems (Content manager and docs.ovh.com)
$ yarn add @ovh-ux/ng-ovh-doc-url
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>
$ yarn test
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.
BSD-3-Clause © OVH SAS