When setting up a project with mobiscroll-cli, I received an error -
No app.module.ts file found. You are probably running this command in a non Angular-cli based application.
I think the issue is that at this line -
|
if (!utils.importModules(path.resolve(currDir + '/src/app/app.module.ts'), 'app.module.ts', settings.jsFileName)) { |
you are not checking angular.json for source root directory.
I got around this issue by just doing the imports myself, but it would be a nice feature if you could support
sourceRoot property as the directory where you check for
app/app.module.ts.
A snippet of angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "resources",
"projects": {
"frontend": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "resources/frontend",
"sourceRoot": "resources/frontend/src",
...
}
When setting up a project with mobiscroll-cli, I received an error -
I think the issue is that at this line -
mobiscroll-cli/src/configAngular.js
Line 78 in 7520be8
I got around this issue by just doing the imports myself, but it would be a nice feature if you could support
sourceRootproperty as the directory where you check forapp/app.module.ts.A snippet of angular.json
{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "resources", "projects": { "frontend": { "projectType": "application", "schematics": { "@schematics/angular:component": { "style": "scss" }, "@schematics/angular:application": { "strict": true } }, "root": "resources/frontend", "sourceRoot": "resources/frontend/src", ... }