Skip to content

chore: add ionic angular example#1124

Merged
fadi-george merged 4 commits intomainfrom
fg/add-angular-example
Dec 1, 2025
Merged

chore: add ionic angular example#1124
fadi-george merged 4 commits intomainfrom
fg/add-angular-example

Conversation

@fadi-george
Copy link
Collaborator

@fadi-george fadi-george commented Dec 1, 2025

Description

One Line Summary

  • add angular ionic example for verification of different user setups

Details

  • adds new IonicAngular example folder
  • moves out the build shell script to use for both example projects
    • does the following to avoid using the bun cache:
rm -rf node_modules/onesignal-cordova-plugin
bun pm cache rm
bun i

Manual testing

➜  IonicAngular git:(fg/add-angular-example) ✗ ionic cap sync ios 
> npm run ionic:build -- --project=app

> IonicAngular@0.0.1 ionic:build
> ../scripts/build.sh IonicAngular --project=app

$ bun run build:vite
$ vite build
vite v7.1.12 building for production...
✓ 12 modules transformed.
Entry module "www/index.ts" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.

...

+ onesignal-cordova-plugin@../../onesignal-cordova-plugin.tgz

✔ Browser application bundle generation complete.

./src/app/app.component.ts:12:6-33 - Error: export 'default' (imported as 'OneSignal') was not found in 'onesignal-cordova-plugin' (module has no exports)

./src/app/app.component.ts:12:34-50 - Error: export 'LogLevel' (imported as 'LogLevel') was not found in 'onesignal-cordova-plugin' (module has no exports)

./src/app/app.component.ts:13:6-26 - Error: export 'default' (imported as 'OneSignal') was not found in 'onesignal-cordova-plugin' (module has no exports)

./src/app/app.component.ts:14:6-21 - Error: export 'default' (imported as 'OneSignal') was not found in 'onesignal-cordova-plugin' (module has no exports)


[ERROR] An error occurred while running subprocess npm.
        
        npm run ionic:build -- --project=app exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more
        information.
➜  IonicAngular git:(fg/add-angular-example) ✗ 

Will follow up in a separate pr with a fix.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@fadi-george fadi-george requested a review from a team as a code owner December 1, 2025 21:26
@fadi-george fadi-george merged commit 025c578 into main Dec 1, 2025
6 checks passed
@fadi-george fadi-george deleted the fg/add-angular-example branch December 1, 2025 22:00
fadi-george added a commit that referenced this pull request Dec 2, 2025
fadi-george added a commit that referenced this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants