-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(@schematics/angular): Applications are zoneless by default #30718
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { ApplicationConfig, provideBrowserGlobalErrorListeners, <% if(!zoneless) { %>provideZoneChangeDetection<% } else { %>provideZonelessChangeDetection<% } %> } from '@angular/core';<% if (routing) { %> | ||
import { ApplicationConfig, provideBrowserGlobalErrorListeners<% if(!zoneless) { %>, provideZoneChangeDetection<% } %> } from '@angular/core';<% if (routing) { %> | ||
import { provideRouter } from '@angular/router'; | ||
|
||
import { routes } from './app.routes';<% } %> | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [ | ||
provideBrowserGlobalErrorListeners(), | ||
<% if(zoneless) { %>provideZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %>, | ||
provideBrowserGlobalErrorListeners(),<% if(!zoneless) { %> | ||
provideZoneChangeDetection({ eventCoalescing: true }),<% } %> | ||
<% if (routing) {%>provideRouter(routes)<% } %> | ||
] | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ | |
"description": "Generate an application that does not use `zone.js`.", | ||
"x-prompt": "Do you want to create a 'zoneless' application without zone.js?", | ||
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. Are we keeping the prompt? |
||
"type": "boolean", | ||
"default": false | ||
"default": true | ||
}, | ||
"fileNameStyleGuide": { | ||
"type": "string", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ export default async function () { | |
// Ensure local test registry is used when outside a project | ||
await setNPMConfigRegistry(true); | ||
|
||
await ng('new', 'test-project', '--skip-install'); | ||
await ng('new', 'test-project', '--skip-install', '--no-zoneless'); | ||
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. In a followup we should likely try to have most of the our tests test the default behavior (IE: zoneless). |
||
await expectFileToExist(join(process.cwd(), 'test-project')); | ||
process.chdir('./test-project'); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.