在Angular中实现外部Cludo脚本的最佳实践

时间:2019-02-04 17:59:58

标签: angular

所以我需要在Angular中实现以下脚本。目前,Cludo还没有Angular的示例。在Angular中包含脚本的最佳做法是什么?

https://cludo.zendesk.com/hc/en-us/articles/360021833312-CludoJS-options-Customize-your-search-through-the-script


<script type="text/javascript" src="//customer.cludo.com/scripts/bundles/search-script.min.js" class="externalScript"></script> 
 <script type="text/javascript" class="externalScript">
 var CludoSearch;
 (function () {
  var cludoSettings = {
    customerId: ID,
    engineId: ID,
    searchUrl: /search,
    language: 'en',
    searchInputs: ['cludo-search-form', 'cludo-search-content-form'],
    type: 'inline',
    searchApiUrl: 'https://api-eu1.cludo.com/api/v3'
 };
 CludoSearch= new Cludo(cludoSettings);
 CludoSearch.init();
})();
</script>

0 个答案:

没有答案