Closed jalbatross closed 4 years ago
I would love to see this pull request to be merged as we are stuck with the same problem in NS6.
@hypery2k these changes seem to not work in NS6 projects - I may need to revert all this and republish previous setup.
@NathanWalker
I just tested this on a clean NS6 Angular app and it seems to be working: https://github.com/jalbatross/working-ngx-fonticon
@jalbatross thanks - will check with fresh project - had troubles integrating this into large existing project - the require
would not work.
Also curious:
let that = this;
return new Promise(function(resolve, reject) {
try {
var cssData = that.config[configKey];
that.mapCss(cssData);
any reason not to just use fat arrow there vs. that/this?
@NathanWalker No reason at all, fat arrow is definitely cleaner.
@jalbatross I published 5.0.2 that cleaned that up to use fat arrow but also compiles the lib with Angular 8 which cleans some compilation issues up. However I ran into problems with the require
usage which was added and found under some project conditions this applies:
https://github.com/NathanWalker/nativescript-ngx-fonticon/issues/62#issuecomment-548233352
We may want to add note to README about this.
@NathanWalker
Agreed, made pr #63 to address it
Fixes https://github.com/NathanWalker/nativescript-ngx-fonticon/issues/60
We could also make it so that there are two separate ways of instantiating config key, value pairs to support the legacy flow (pre NS6). However, I think that this implementation will work for pre NS6 as well.