Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/app/app.module.ts
Copy link

@darklight365 darklight365 May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeanKelly369 + @farfromrefug - would this commit not break every other angular plugin in the nativescript-community that makes use of this plugin seed?

For example take a look at the install.module in this plugin (which also relies on this angular seed project):
https://github.com/nativescript-community/ui-material-components

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darklight365. Yes it Will be used in a repos now.
But why would it break ?

Copy link

@darklight365 darklight365 May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@farfromrefug - The module now hard code includes the ui-collectionview components and does no longer dynamically include the COMPONENTS via the plugins install.module.

Check here:

declarations: [AppComponent, MenuComponent, SimpleGridComponent, HorizontalGridComponent, SimpleWaterfallComponent, SimpleTemplatesComponent, SwipeMenuComponent],

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch it is bad !

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to this commit the seed project would import the COMPONENTS from the demo-snippets install.module, as seen here:

https://github.com/nativescript-community/ui-material-components/blob/a8a588bfb9658b3974901223c74e8a1442af20d0/demo-snippets/ng/install.module.ts#L29

With this change: the only components included in the angular test project is the ui-collectionview components.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a try to fix build errors on angular demos.
Buy you got it to work in swipemenu without this? I mean did you revert this to have it work in swipemenu?

Copy link

@darklight365 darklight365 May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I did a clean checkout from master (force updated my branch). So the SwipeMenu changes worked with the current ng project seed.

I would need to perform some additional tests to see if reverting the ng seed app.module has any build issues still.

Copy link

@darklight365 darklight365 May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@farfromrefug - I've made the Angular seed generic again with this PR: #6

The other piece of the puzzle is to correctly export the SwipeMenuComponent in the demo-snippets/ng, PR for that is:
nativescript-community/ui-collectionview#80

cc: @SeanKelly369 for info

Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
import { NativeScriptModule } from '@nativescript/angular';

import { COMPONENTS, InstallModule } from '../../../demo-snippets/ng/install.module';
import { InstallModule } from '../../../demo-snippets/ng/install.module';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MenuComponent } from './menu/menu.component';
import { SimpleGridComponent } from '@nativescript-community/template-snippet/ng/simple-grid/simple-grid.component';
import { HorizontalGridComponent } from '@nativescript-community/template-snippet/ng/horizontal-grid/horizontal-grid.component';
import { SimpleWaterfallComponent } from '@nativescript-community/template-snippet/ng/simple-waterfall/simple-waterfall.component';
import { SimpleTemplatesComponent } from '@nativescript-community/template-snippet/ng/simple-templates/simple-templates.component';
import { SwipeMenuComponent } from '@nativescript-community/template-snippet/ng/swipe-menu/swipe-menu.component';

@NgModule({
bootstrap: [AppComponent],
imports: [NativeScriptModule, AppRoutingModule, InstallModule],
declarations: [AppComponent, MenuComponent, ...COMPONENTS],
declarations: [AppComponent, MenuComponent, SimpleGridComponent, HorizontalGridComponent, SimpleWaterfallComponent, SimpleTemplatesComponent, SwipeMenuComponent],
providers: [],
schemas: [NO_ERRORS_SCHEMA]
})
Expand Down
4 changes: 4 additions & 0 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ import 'zone.js';

// Add NativeScript specific Zone JS patches
import '@nativescript/zone-js';

if (typeof queueMicrotask === 'undefined') {
global.queueMicrotask = (cb) => Promise.resolve().then(cb);
}