after importing function in angular I get xxx is not a functionHow do I import an SQL file using the command line in MySQL?How to import component into another root component in Angular 2angular 2 app component not loadingGet incorrect offsetWidth and offsetHeight valuesImport node js module in angular 2 applicationAngular Cli- In StyleURL add a css file located in the node_module directoryHow in angular 2+, dynamically manage the addition of animations (:enter and :leave) under certain conditions?Using materialize-css (v 1.0.0) in Angular 5 does not workAngular HTTP request error: “post valid request”How to use google Transliterate in angular 6?

Why would an AC motor heavily shake when driven with certain frequencies?

How should Thaumaturgy's "three times as loud as normal" be interpreted?

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

Friend is very nitpicky about side comments I don't intend to be taken too seriously

Leaving the USA for 10 yrs when you have asylum

Write a Schrödinger's sentence

Poor management handling of recent sickness and how to approach my return?

Features seen on the Space Shuttle's solid booster; what does "LOADED" mean exactly?

Does the word voltage exist in academic engineering?

How can I return only the number of paired values in array?

I need to know information from an old German birth certificate

Is there a way to deal with desistance in a off-chain game?

Can multiple public keys lead to the same shared secret in x25519?

Why would an airport be depicted with symbology for runways longer than 8,069 feet even though it is reported on the sectional as 7,200 feet?

Word for something that used to be popular but not anymore

Remove outer padding in tikzcd

How to say "In Japan, I want to ..."?

Why did Tony's Arc Reactor do this?

What exactly is Apple Cider

Owner keeps cutting corners and poaching workers for his other company

What can we do about our 9-month-old putting fingers down his throat?

Why does PAUSE key have a long make code and no break code?

Bacteria vats to generate edible biomass, require intermediary species?

Do you need to burn fuel between gravity assists?



after importing function in angular I get xxx is not a function


How do I import an SQL file using the command line in MySQL?How to import component into another root component in Angular 2angular 2 app component not loadingGet incorrect offsetWidth and offsetHeight valuesImport node js module in angular 2 applicationAngular Cli- In StyleURL add a css file located in the node_module directoryHow in angular 2+, dynamically manage the addition of animations (:enter and :leave) under certain conditions?Using materialize-css (v 1.0.0) in Angular 5 does not workAngular HTTP request error: “post valid request”How to use google Transliterate in angular 6?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am a beginner in Angular2. I'd like to use a function from a 3rd party library, but I get "xxx is not a function".



This is the code in 'app.component.ts':



import Component, OnInit from '@angular/core';
import arrayShuffle from "array-shuffle";

@Component(
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
)
export class AppComponent implements OnInit
name = 'Angular';
list: string[] = [];

ngOnInit()
this.list.push("C value");
this.list.push("B value");
this.list.push("A value");
console.log("list: " + this.list);
const shuffled = arrayShuffle(this.list);
console.log("list: " + this.list);




This is the whole thing on stackblitz



What is my mistake?










share|improve this question
































    0















    I am a beginner in Angular2. I'd like to use a function from a 3rd party library, but I get "xxx is not a function".



    This is the code in 'app.component.ts':



    import Component, OnInit from '@angular/core';
    import arrayShuffle from "array-shuffle";

    @Component(
    selector: 'my-app',
    templateUrl: './app.component.html',
    styleUrls: [ './app.component.css' ]
    )
    export class AppComponent implements OnInit
    name = 'Angular';
    list: string[] = [];

    ngOnInit()
    this.list.push("C value");
    this.list.push("B value");
    this.list.push("A value");
    console.log("list: " + this.list);
    const shuffled = arrayShuffle(this.list);
    console.log("list: " + this.list);




    This is the whole thing on stackblitz



    What is my mistake?










    share|improve this question




























      0












      0








      0








      I am a beginner in Angular2. I'd like to use a function from a 3rd party library, but I get "xxx is not a function".



      This is the code in 'app.component.ts':



      import Component, OnInit from '@angular/core';
      import arrayShuffle from "array-shuffle";

      @Component(
      selector: 'my-app',
      templateUrl: './app.component.html',
      styleUrls: [ './app.component.css' ]
      )
      export class AppComponent implements OnInit
      name = 'Angular';
      list: string[] = [];

      ngOnInit()
      this.list.push("C value");
      this.list.push("B value");
      this.list.push("A value");
      console.log("list: " + this.list);
      const shuffled = arrayShuffle(this.list);
      console.log("list: " + this.list);




      This is the whole thing on stackblitz



      What is my mistake?










      share|improve this question
















      I am a beginner in Angular2. I'd like to use a function from a 3rd party library, but I get "xxx is not a function".



      This is the code in 'app.component.ts':



      import Component, OnInit from '@angular/core';
      import arrayShuffle from "array-shuffle";

      @Component(
      selector: 'my-app',
      templateUrl: './app.component.html',
      styleUrls: [ './app.component.css' ]
      )
      export class AppComponent implements OnInit
      name = 'Angular';
      list: string[] = [];

      ngOnInit()
      this.list.push("C value");
      this.list.push("B value");
      this.list.push("A value");
      console.log("list: " + this.list);
      const shuffled = arrayShuffle(this.list);
      console.log("list: " + this.list);




      This is the whole thing on stackblitz



      What is my mistake?







      angular import






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 7:42







      riskop

















      asked Mar 28 at 7:29









      riskopriskop

      1,0459 silver badges26 bronze badges




      1,0459 silver badges26 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          2
















          change your import line from



          import arrayShuffle from "array-shuffle";


          to



          import arrayShuffle from "array-shuffle";





          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392215%2fafter-importing-function-in-angular-i-get-xxx-is-not-a-function%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2
















            change your import line from



            import arrayShuffle from "array-shuffle";


            to



            import arrayShuffle from "array-shuffle";





            share|improve this answer





























              2
















              change your import line from



              import arrayShuffle from "array-shuffle";


              to



              import arrayShuffle from "array-shuffle";





              share|improve this answer



























                2














                2










                2









                change your import line from



                import arrayShuffle from "array-shuffle";


                to



                import arrayShuffle from "array-shuffle";





                share|improve this answer













                change your import line from



                import arrayShuffle from "array-shuffle";


                to



                import arrayShuffle from "array-shuffle";






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 28 at 7:42









                NiraliNirali

                1709 bronze badges




                1709 bronze badges



















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392215%2fafter-importing-function-in-angular-i-get-xxx-is-not-a-function%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해