Is it possible to set …

less than 1 minute read

Is it possible to set schematics.@schematics/angular.component.changeDetection OnPush for the whole workspace? Or do we need to set it on each application?

Responses:

have you tried setting it here? { "version":1, "projects":{...}, }, "cli": { "defaultCollection": "@nrwl/angular", "analytics": "c60f0ead-1ebd-4c4e-886d-6204e68aa6e5" }, "schematics": { "@nrwl/angular:application": { "unitTestRunner": "jest", "e2eTestRunner": "cypress" }, "@nrwl/angular:library": { "unitTestRunner": "jest" } /* HERE */ }, "defaultProject": "frontend" }

I tried to add it like this: "schematics": { "@nrwl/workspace": { "library": { "linter": "eslint", "@nrwl/angular:component": { "style": "scss", "changeDetetion": "onPush" } } }, But it didn’t work :confused:

oh no, i think you need to add it below schematics , not under library

Yes I saw that.. tested that as well.. no luck :disappointed:

oh.. it looks like @nrwl/angular:component should be @schematics/angular:components… or?

yeah, because the @nrwl/angular can’t generate components. it generates libs or apps

at least not that i know of

hmm.. still not working :confused:

what command are you using?

nx generate @schematics/angular:component --name=qwerfgh --project=ui

(using nx console in vs code)

"@schematics/angular:component": { "style": "scss", "changeDetetion": "onPush" }

you have a typo in there

changeDetection

OMG! :smile:

Updated: