Where to include js libraries in Ionic?

前端 未结 3 2028
旧时难觅i
旧时难觅i 2021-01-12 22:38

thanks for your time! I am battling to get any scripts running in the Ionic framework\'s sidemenu starter template. I have placed them everywhere (except where they\'re supp

3条回答
  •  甜味超标
    2021-01-12 22:54

    As nice listed by a user here https://github.com/ionic-team/ionic/issues/9422

    1. Install latest ionic
    2. Start your project
    3. Go to /src/
    4. open the assets folder
    5. create a /js/ folder inside assets
    6. copy your .js inside this js folder
    7. goto /src/index.html
    8. Add your path
    9. Go to your typescript file of choice and declare var N;
    10. N.yourFunction
    11. ionic serve

提交回复
热议问题