title: adding custom scripts with custom attributes in angular 6 project
body: <p>I need to add a script(cdn) in a component in my angular project.</p>
  
  <p>on in it</p>
  
  <pre><code>
          // Start: for drop box
          var dbx = new Dropbox({ accessToken: 'A4fRBcFXasdkpAAAAAdgfdfgdfgAAAAAZBlQ9MJNe81yrTLOCioH-7Ty083asdEQSqTD97s7mLIJH0V', fetch: fetch });
          dbx.filesListFolder({ path: '' })
            .then(function (response) {
              console.log(response);
            })
            .catch(function (error) {
              console.log(error);
            });
          // End: for dropbox```
  
  </code></pre>
  
  <pre><code>addJsToElementDropbox(src: string, type: string, id: string, key: string): HTMLScriptElement {
  
      let script:any = document.createElement('script');
      script.type = type;
      script.src = src;
      script.id = id;      
      this.renderer.appendChild(document.body, script);
      return script;
  
  }```
  </code></pre>
  
  <p>This is the script created in the DOM</p>
  
  <p><code>&lt;script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs"&gt;&lt;/script&gt;</code></p>
  
  <p>My need is to create a script like this in DOM</p>
  
  <p><code>&lt;script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="my-key"&gt;&lt;/script&gt;</code></p>