search

Home  >  Q&A  >  body text

angular.js - Problems with angular introducing jweixin

My project uses AngularJs and introduces third-party libraries, such as WeChat js-sdk.

<script type="text/javascript" src="js/lib/angular/angular.js"></script>
<script type="text/javascript" src="js/lib/angular/angular-route.js"></script>
<script type="text/javascript" src="js/lib/jweixin/jweixin-1.0.0.js"></script>

Then, an error was reported.
How do AngularJs projects use third-party libraries, such as WeChat js-sdk?

过去多啦不再A梦过去多啦不再A梦2788 days ago1302

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 17:11:58

    Have you injected a wx into angular? ? ?

    What you load through js reference will directly hang a wx global object on the window. Use it directly without injection.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 17:11:58

    Introduce WeChat’s js directly and use the method inside. There is no need to inject it into the controller

    reply
    0
  • Cancelreply