Skip to content

Commit d6cb5cb

Browse files
author
Keen Yee Liau
committed
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. (cherry picked from commit 458efc8)
1 parent fe99614 commit d6cb5cb

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
@@ -378,7 +378,10 @@ function constructArgs(ctx: vscode.ExtensionContext): string[] {
378378
const ngProbeLocations = getProbeLocations(ngdk, ctx.extensionPath);
379379
args.push('--ngProbeLocations', ngProbeLocations.join(','));
380380

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

0 commit comments

Comments
 (0)