angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

3rd party library did not work on Production

Open v11g opened this issue 10 years ago • 3 comments

Please provide us with the following information:

angular-cli: 1.0.0-beta.5 node: 5.10.0 os: linux x64

The 3rd library did great in development. In prod, the 3rd lib was not defined. I got the following logs:


ORIGINAL EXCEPTION: ReferenceError: tingle is not defined ReferenceError: tingle is not defined at a.removeItem (index.js:1) at b._View_a1._handle_click_27_0 (a.template.js:710) at eval (main.js:22) at eval (main.js:13) at eval (main.js:12) at ZoneDelegate.invoke (zone.js:323) at Object.inner.inner.fork.onInvoke (main.js:21) at ZoneDelegate.invoke (zone.js:322) at Zone.runGuarded (zone.js:230) at a.runInnerGuarded (main.js:21)

Please help me solve this issue. Thanks so much.

v11g avatar Jun 07 '16 09:06 v11g

Did you follow https://github.com/angular/angular-cli/wiki/3rd-party-libs for adding your third party library?

If you're trying to add javascript as script tags, you have to instead load it via SystemJS, see https://github.com/angular/angular-cli/issues/1015

filipesilva avatar Jun 07 '16 15:06 filipesilva

Declaring it as global, then it works great. Thanks so much.

v11g avatar Jun 08 '16 02:06 v11g

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.