Comments (10)
with @nrwl/[email protected] I was able to generate the library without routing and lazy loading using
ng g lib gridmap --prefix=ngx --parent-module=libs/dashboard/src/lib/dashboard.module.ts --tags=child-module
from ngx-starter-kit.
In a forked repo, I copied "libs/grid" to "libs/gridmap"
and replaced "account" with "vehicle".
you cannot just copy a module. Create gridmap
lib module and copy/generate required controllers and/or services.
ng g lib gridmap --routing --lazy --prefix=ngx --parent-module=libs/dashboard/src/lib/dashboard.module.ts --tags=child-module
you can see examples for modules/code generation in palybook
from ngx-starter-kit.
Running that command returns this error:
Unexpected token } in JSON at position 2584
How would I determine what file and line has the extra }?
I've installed the Redux DevTools extension.
from ngx-starter-kit.
Fix is on the way. We need to downgrade angular cli to stable version
from ngx-starter-kit.
get the latest code. This should fix it.
from ngx-starter-kit.
Thanks, the command runs without error. (But no results are returned, and I could not find gridmap in the code after running.)
Where would I define the new module to avoid this error:
VM2379:37 ERROR Error: Uncaught (in promise): Error: Cannot find module "@ngx-starter-kit/gridmap".
Error: Cannot find module "@ngx-starter-kit/gridmap".
at $_lazy_route_resource lazy namespace object:46
at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:3825)
at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
at Zone.push.../../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
Also, a lot of errors are occurring because socket.io is looking for port 3000.
Here's the fork where the errors are occurring. I ran the command both before and after copying the gridmap folder into the repo:
https://github.com/DataPortal/coord-angular
from ngx-starter-kit.
Noticed same issue.
nx
team is updating the version to make it compatible with angular 6.1.0
nrwl/nx#645
we may have to wait or manually create module.
Manual module creation:
- copy module e.g.,
libs/grid
aslibs\gridmap
- do any module, controller, service class name changes as needed.
- add
gridmap
reference inapps/webapp/tsconfig.app.json
- add
gridmap
reference inapps/webapp-e2e/tsconfig.e2e.json
- add
gridmap
reference innx.json
Reference: https://nrwl.io/nx/guide-nx-workspace
from ngx-starter-kit.
Getting very close. Remaining error:
Could not resolve module @ngx-starter-kit/gridmap relative to /Library/Sites/coord-angular/libs/dashboard/src/lib/dashboard.module.ts
Failed to compile.
https://github.com/DataPortal/coord-angular/blob/master/libs/gridmap/src/lib/gridmap.module.ts
Removing the following allows the site to compile:
{ path: '', redirectTo: 'crud-table', pathMatch: 'full', data: { animation: 'gridmap' } },
{ path: 'crud-table', component: VehiclesTableComponent, data: { animation: 'vehicles-table' },
children: [
{ path: ':id', component: VehicleDetailComponent, data: { animation: 'vehicle-detail' } },
],
},
How would I alter the lines above to get the side navigation working?
from ngx-starter-kit.
you also need to add gridmap
reference to tsconfig.json
and gridmap
block to angular.json
as shown in the diff below. luckily all of those steps are taken care by nx
CLI. we have to wait for nx 6.2 release.
https://github.com/CrossBusiness/coord-angular/commit/dd3f060e4e6e4cc81980a4ed44c54553557708ae
send you PR to make it easy for you to pull changes.
At this point you also need to fix code specific you business requirements.
from ngx-starter-kit.
with latest code, you should be able to generate lazy routing modules. please test and report any issues.
we have to lock typescript version to 2.7.2 until this issue resolved.
nrwl/nx#684
from ngx-starter-kit.
Related Issues (20)
- An in-range update of fortawesome is breaking the build 🚨
- An in-range update of @types/jest is breaking the build 🚨 HOT 2
- An in-range update of @angular-devkit/build-angular is breaking the build 🚨 HOT 1
- Action Required: Fix Renovate Configuration
- what is "var" ?
- Error with image-comparison HOT 2
- Need more documentation HOT 2
- Ivy fails with NGXS
- @ngx-starter-kit/ngx-utils removed from npm HOT 4
- Please re-publish also 0.0.3 version. HOT 4
- support for nestjs compiler plugins (e.g. for swagger)
- iPhone not ringing with incoming calls HOT 1
- Keycloak Default Config file not accessible
- An in-range update of filepond-plugin-image-preview is breaking the build 🚨 HOT 2
- Dependency Dashboard
- [Question] Testing & (Mock) Classes HOT 4
- An in-range update of @nrwl/workspace is breaking the build 🚨 HOT 1
- Error: original.line and original.column are not numbers
- An in-range update of @semantic-release/github is breaking the build 🚨 HOT 1
- How long does it take you to save a recompile boot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-starter-kit.