Welcome to the new Box Support website. Check out all the details here on what’s changed.

Angular 4 integration for ContentExplorer

New post

Comments

4 comments

  • architart

    i too am looking for this

    0
    Comment actions Permalink
  • joeyc_3

    Hey,

     

    I got this working by importing the js file directly into my component 

     

    import { Component, OnInit } from '@angular/core';
    import '../../../box_content_explorer.js';

    declare var Box: any;

    @Component({
      selector: 'app-general',
      templateUrl: './general.component.html',
      styleUrls: ['./general.component.scss']
    })
    export class GeneralComponent implements OnInit {

      constructor() { }

      ngOnInit() {
        const contentExplorer = new Box.ContentExplorer();

        contentExplorer.show('FOLDER_ID', 'ACCESS_TOKEN', {
            container: '.container'
        });
      }
    }
     
     
     
     
     
    <div style="height:100vh" class="container">div>
    0
    Comment actions Permalink
  • damocles

    How did you install the file locally? The NPM package requires react.

     

    Edit: okay I was able to copy the file served from the cdn and paste it in locally. Though I had to use the react one. No CSS yet

    0
    Comment actions Permalink
  • kasee nadh reddy

    We can use the CDN Links of CSS and Scripts directly in index.html
    Refe this repository

    https://github.com/bojjakaseenadhreddy/integrate-box-ui-elments-in-anugular

    0
    Comment actions Permalink

Please sign in to leave a comment.