pizzicato icon indicating copy to clipboard operation
pizzicato copied to clipboard

Angular2+ compatibility

Open jmurowaniecki opened this issue 4 years ago • 0 comments

The class 'SoundService' cannot be created via dependency injection, as it does not have an Angular decorator. This will result in an error at runtime.

Either add the @Injectable() decorator to 'SoundService', or configure a different provider (such as a provider with 'useFactory').


I'm using Pizzicato || window['Pizzicato'] || ... in order to work around the problem, including the module on angular.json as below:

{
  ...
  "projects": {
      ...
      "architect": {
        ...
        "build": {
          ...
          "options": {
            ...
            "scripts": [
              "node_modules/pizzicato/distr/Pizzicato.min.js"
            ]
          }
...

I hope it helps someone's else.

jmurowaniecki avatar May 11 '20 03:05 jmurowaniecki