-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Angular 20 #151
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
feat: Angular 20 #151
Changes from 1 commit
f36f05f
501c8cd
0f0a501
3dd69bc
7f06cae
be73d52
3bf6a5d
9694289
2e7ce75
749f1f3
ee1d340
028f88d
029299e
1503236
b3843e0
c96e0a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
import '@nativescript/core/globals'; | ||
// Install @nativescript/angular specific polyfills | ||
import '@nativescript/angular/polyfills'; | ||
|
||
import { AbortController, AbortSignal } from '@nativescript/core/abortcontroller'; | ||
(global as any).AbortController = AbortController; | ||
(global as any).AbortSignal = AbortSignal; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be in the pre-zone polyfills There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed but I'll leave comment in case want to adjust further - they are in pre-zone polyfills now. |
||
/** | ||
* Zone.js and patches | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
const webpack = require('@nativescript/webpack'); | ||
const { ProvidePlugin } = require("webpack"); | ||
|
||
module.exports = (env) => { | ||
webpack.init(env); | ||
webpack.useConfig('angular'); | ||
|
||
webpack.chainWebpack((config) => { | ||
config.resolve.set('fallback', { | ||
AbortController: require.resolve('@nativescript/core/abortcontroller'), | ||
AbortSignal: require.resolve('@nativescript/core/abortcontroller'), | ||
}); | ||
}); | ||
|
||
NathanWalker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return webpack.resolveConfig(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,13 @@ import { | |
EnvironmentInjector, | ||
EventEmitter, | ||
Inject, | ||
InjectFlags, | ||
InjectionToken, | ||
InjectOptions, | ||
Injector, | ||
NgZone, | ||
OnDestroy, | ||
Output, | ||
SkipSelf, | ||
Type, | ||
ViewContainerRef, | ||
} from '@angular/core'; | ||
|
@@ -84,12 +84,12 @@ export class DestructibleInjector implements Injector { | |
private destructibleProviders: ProviderSet, | ||
private parent: Injector, | ||
) {} | ||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions | InjectFlags): T { | ||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions): T { | ||
const ref = this.parent.get(token, notFoundValue, flags); | ||
|
||
// if we're skipping ourselves then it's not our responsibility to destroy | ||
if (typeof flags === 'number') { | ||
if (!(flags & InjectFlags.SkipSelf) && this.destructibleProviders.has(token)) { | ||
if (!(flags && this.destructibleProviders.has(token))) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this breaks the skipself flags |
||
this.refs.add(ref); | ||
} | ||
} else { | ||
|
Uh oh!
There was an error while loading. Please reload this page.