-
-
Notifications
You must be signed in to change notification settings - Fork 79
Angular BottomNavigationBar showBadge fix #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular BottomNavigationBar showBadge fix #139
Conversation
…igationView, replace with getOrCreateBadge
thanks @james-criscuolo !! |
It can wait, i have the overwrite in my code for now. Thanks for the quick take though! My other investigation on this library is making it work with angular 9. I am using your bottom nav bar because our project was using nativescript's deprecated bottom nav, which didn't work with [what is expected to be the stable nativescript-angular for angular 9](NativeScript/nativescript-angular#2124. The new bottom nav also seems to have some issues, and doesn't have badges, so I found your project and managed to get it up and running with angular 9, with ivy disabled. Enabling ivy, this library breaks the build. Is this something you are investigating, or would you be open to me taking a stab at it? It may be as simple as updating the dependencies, I am not sure yet, but I figure it's worth asking before making the attempt. |
@james-criscuolo what is ivy? Sorry i am not using angular dev. |
Angular replaced their compiler, the old one was called ViewEngine, the new one is called Ivy. Ivy was experimental in version 8, but is now default in version 9, and comes with a bunch of improvements. In version 10, ViewEngine will be gone. I believe in the current situation, libraries don't have to change to support angular 9 w/ ivy, they were waiting for 10 to change build artifacts, but maybe how |
@james-criscuolo ok didn't know. Maybe it fails because i generate angular metadata with ngc which are not compatible with ivy. Would need to talk to other plugin devs to see if can get rid of ngc build. |
That is almost certainly the root of the issue. I will definitely mess around, but if you have other plugin developers you can ask, I'm sure they will know more. |
Just wanted to update, I gave this a go, and I think it's going to take a bit deeper understanding. I was able to update dependencies and package something that looked correct, but my app will not take it. I also ran into issues attempting to run the angular demo in this repo, otherwise that would've been the better place to test against. The normal demo had a handful of typescript errors that did not stop compilation after the typescript update (not sure about before), but seemed to work (with the exception of the top choice (button I think?), which crashes the app. It looked like a nativescript error, so I thought that probably exists on master too. I may put a pull request together to fix the demos, but I'm not sure I'll be able to get to it quickly. |
@james-criscuolo let's continue that discussion on slack. Might be better . there you can show me the errors you get with the demo. I might be able to help. |
UPDATE: I went ahead and submitted this as an issue for visibility: #141 Is there any update on supporting angular 9/ivy with nativescript-material-components? I’m also getting errors saying it’s not compatible. It works fine with ivy turned off. Just for reference, here are the errors I'm getting while trying to build with Ivy enabled:
I could make this a separate issue in your repo if you'd like. Let me know, thanks! |
The code was trying to call
showBadge
on this: https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationViewOverwriting this from outside the library with
getOrCreateBadge
works as expected.