Giter Club home page Giter Club logo

ngx-onesignal's Issues

Not compatible with Angular Ivy

I am submitting a

  • Bug Report

What is the expected behavior?

I have installed as per instructions
Should work properly.

What is the current behavior?

When I import NgxOneSignalModule I get this error related to not compatible with Angular Ivy

image

What are the steps to reproduce?

Try to install it with Angular 10+

Which versions are you using for the following packages?

Angular: 10.1.2
Angular CDK: 10.1.2
Angular CLI: 10.1.2
Nx (option):
ngx-onesignal: 0.0.7

Is there anything else we should know?

Support for Safari

I am submitting a

  • Bug Report

What is the expected behavior?

Be able to get the user id through await OneSignal.getUserId()

What is the current behavior?

It returns a bug when subscribing as shown:

Screen Shot 2020-10-31 at 4 38 19 PM
Screen Shot 2020-10-31 at 4 37 57 PM

What are the steps to reproduce?

As far as I can see just creating the project as the example in the docs.

What is the use-case or motivation for changing an existing behavior?

Which versions are you using for the following packages?

Angular: 10.2.0
Angular CDK: 10.2.6
Angular CLI: 10.2.0
Nx (option):
ngx-onesignal: 10.0.0

Is there anything else we should know?

This is my app.module:

NgxOneSignalModule.forRoot({
      appId: 'my-app-id,
      autoRegister: false,
      allowLocalhostAsSecureOrigin: true,
      notifyButton: {
        enable: true,
      },
    }),

And my app.component:

import { Component, OnInit } from '@angular/core';
import { OneSignalService } from 'ngx-onesignal';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {

  constructor(public readonly onesignal: OneSignalService) {
    (window as any).ngxOnesignal = this.onesignal;
  }

  ngOnInit(): void {
    setTimeout(() => {
      this.onesignal.subscribe();
      console.log(`Initiated`);
    }, 2000);
  }
}

Also, I couldn't see anything about the safari_web_id property as described in https://documentation.onesignal.com/docs/safari-web-push-setup, so, does this wrapper supports it?

My Safari version is 14.0 (15610.1.28.1.9, 15610) and I'm on a Mac OS Catalina 10.15.7.

You can access my example here https://onesignal-testing.surge.sh and also its repository on Github https://github.com/nncl/ngx-onesignal-test

I really appreciate your help :)

add an Observable that knows that global oneSignal has enabled.

I am submitting a

  • Feature Request

What is the expected behavior?

What is the current behavior?

What are the steps to reproduce?

What is the use-case or motivation for changing an existing behavior?

Which versions are you using for the following packages?

Angular:
Angular CDK:
Angular CLI:
Nx (option):
ngx-onesignal:

Is there anything else we should know?

How to send tags?

Hi,

I need to send tags using this module. I've found the method this.onesignal.send(method: OneSignalStubFuncionList, value: undefined) but I don't know how to send a tag using this method.

Can you post an example using the .push(...) method?

Compile fails after adding package with angular@^8.0.0

I am submitting a

  • Bug Report

What is the expected behavior?

The module can be added without any problems

What is the current behavior?

As soon as the module is added to the imports of AppModule the build fails with the following error:

ERROR in Error during template compile of 'NgModule'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Unexpected value '[object Object]' imported by the module 'AppModule in [...]/src/app/app.module.ts'. Please add a @NgModule annotation.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'NgModule'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.
Error during template compile of 'Injectable'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called.

As soon as I remove the import then the app compiles normally again

What are the steps to reproduce?

Create a Angular v8 app following the documented steps and try to compile in production mode.

Which versions are you using for the following packages?

Angular: 8.2.3
Angular CLI: 8.3.0
ngx-onesignal: 0.0.7

How to get userID and pushToken?

I am submitting a

  • Feature Request

What is the expected behavior?

Get userId and pushToken

What is the current behavior?

What are the steps to reproduce?

What is the use-case or motivation for changing an existing behavior?

Which versions are you using for the following packages?

Angular: 9.1.2
Angular CDK:
Angular CLI: latest
Nx (option):
ngx-onesignal: latest

Is there anything else we should know?

node version 12

npm install ngx-onesignal

node: 14.15.4
Wanted node version 12 (>=12.0.0 <13.0.0)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `npx check-node-version --node 12`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.

Is it really need restrict node version to 12?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.