Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 458efc8

Browse files
author
Keen Yee Liau
authored
fix: check Angular version if angular.view-engine is false (#1358)
This commit fixes a bug where View Engine is not launched even though the Angular version is resolved correctly. This is because the configuration value is typed as "boolean", and defaults to `false` when the value is not set.
1 parent ee741f8 commit 458efc8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,10 @@ function constructArgs(ctx: vscode.ExtensionContext): string[] {
394394
const ngProbeLocations = getProbeLocations(ngdk, ctx.extensionPath);
395395
args.push('--ngProbeLocations', ngProbeLocations.join(','));
396396

397-
const viewEngine: boolean = config.get('angular.view-engine', !allProjectsSupportIvy());
397+
// Because the configuration is typed as "boolean" in package.json, vscode
398+
// will return false even when the value is not set. If value is false, then
399+
// we need to check if all projects support Ivy language service.
400+
const viewEngine: boolean = config.get('angular.view-engine') || !allProjectsSupportIvy();
398401
if (viewEngine) {
399402
args.push('--viewEngine');
400403
}

0 commit comments

Comments
 (0)