GithubHelp home page GithubHelp logo

getComputedStyle undefined about uniform HOT 7 CLOSED

ldoloscan avatar ldoloscan commented on June 10, 2024
getComputedStyle undefined

from uniform.

Comments (7)

ldoloscan avatar ldoloscan commented on June 10, 2024

I fixed it by injecting jquery.uniform.standalone.js right into index.html file, but I don't understand why this won't work by importing it in component, any ideas ?

from uniform.

tvarwig avatar tvarwig commented on June 10, 2024

Having same issue any update?

from uniform.

ldoloscan avatar ldoloscan commented on June 10, 2024

@tvarwig Have you tried to put this into index.html file by <script/> tag ?

from uniform.

tvarwig avatar tvarwig commented on June 10, 2024

@ldoloscan I did place it in my index.html file as a separate script. 'jQuery' and the library 'uniform' are loading and defined. I did console.log my element to make sure it is finding it. This morning just for testing I tried in vuejs and am getting the same error as with angular 4. Other jQuery libs like select2 are loading and rendering just fine.

from uniform.

ldoloscan avatar ldoloscan commented on June 10, 2024

@tvarwig Try to put js file in in cli.json, in script key, and what I did after was in ngOnInit:

        $(this._rootNode.nativeElement).find('input').uniform({
            wrapperClass: this.classes
        });

and also the checkbox styles imported in component import 'jquery.uniform/dist/css/default.css';

Try this way, hope it'll help !!!

from uniform.

tvarwig avatar tvarwig commented on June 10, 2024

I did get it working. I noticed If I place the import uniform script in the component it will not load on first render/mount. If I go to a different route and back to the page uniform loads fine for VueJS anyway. Havn't tested it with Angular yet. I don't believe this is a vuejs or angular issue because other libs load without this workaround

from uniform.

shehi avatar shehi commented on June 10, 2024

Is this resolved?

from uniform.

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.