Giter Site home page Giter Site logo

Comments (8)

jeffswartz avatar jeffswartz commented on July 17, 2024

You need to use this (adding .default):

require('opentok-network-test-js').default

I will correct the readme. Thanks, @slpn1.

from opentok-network-test-js.

slpn1 avatar slpn1 commented on July 17, 2024

Thanks! Working now.

from opentok-network-test-js.

johnjbateman avatar johnjbateman commented on July 17, 2024

@slpn1 Just curious, did you get all of this test working in AngularJS? This is fully compatible?

from opentok-network-test-js.

slpn1 avatar slpn1 commented on July 17, 2024

@johnjbateman Hi John. Yes this is working fine with Angular JS 1.5.8.

from opentok-network-test-js.

johnjbateman avatar johnjbateman commented on July 17, 2024

Thanks @slpn1

I am having trouble getting the NetworkTest object in my controller. I am messing with RequireJS, but will Angular do this instead? Do you happen to have any snippets of how to wire up this correctly?

const OTNetworkTest = require('opentok-network-test-js').default;

I keep getting this error:

Module name has not been loaded yet for context: _. Use require([])

I am going dow nthe rabbit hole in RequireJS and not having luck.

Thanks for the reply!

from opentok-network-test-js.

slpn1 avatar slpn1 commented on July 17, 2024

@johnjbateman I have exactly the same code as you and it works fine, but I am using Webpack not RequireJS for module handling. I don't know much about RequireJS but looking at the docs here it looks like you need to pass an array to require, not a string. That matches with error you are receiving.

from opentok-network-test-js.

johnjbateman avatar johnjbateman commented on July 17, 2024

OK, I will check into WebPack and see if that helps at all. I have not used RequireJS before this.

from opentok-network-test-js.

johnjbateman avatar johnjbateman commented on July 17, 2024

@slpn1 Any chance you can share a snippet of your webpack.config.js?

from opentok-network-test-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.