-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): remove i18n markup even if no translations (#17999)
Fixes #11042
- Loading branch information
Showing
11 changed files
with
148 additions
and
30 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/compiler-cli/integrationtest/alt/src/bootstrap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {BasicComp} from '../../src/basic'; | ||
import {MainModuleNgFactory} from './module.ngfactory'; | ||
|
||
MainModuleNgFactory.create(null).instance.appRef.bootstrap(BasicComp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {NgModuleRef} from '@angular/core'; | ||
import {ComponentFixture} from '@angular/core/testing'; | ||
import {platformServerTesting} from '@angular/platform-server/testing'; | ||
|
||
import {MainModuleNgFactory} from '../alt/src/module.ngfactory'; | ||
import {MainModule} from '../src/module'; | ||
|
||
let mainModuleRef: NgModuleRef<MainModule> = null !; | ||
beforeEach((done) => { | ||
platformServerTesting().bootstrapModuleFactory(MainModuleNgFactory).then((moduleRef: any) => { | ||
mainModuleRef = moduleRef; | ||
done(); | ||
}); | ||
}); | ||
|
||
export function createModule(): NgModuleRef<MainModule> { | ||
return mainModuleRef; | ||
} | ||
|
||
export function createComponentAlt<C>(comp: {new (...args: any[]): C}): ComponentFixture<C> { | ||
const moduleRef = createModule(); | ||
const compRef = | ||
moduleRef.componentFactoryResolver.resolveComponentFactory(comp).create(moduleRef.injector); | ||
return new ComponentFixture(compRef, null, false); | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/compiler-cli/integrationtest/tsconfig-build-alt.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"angularCompilerOptions": { | ||
// For TypeScript 1.8, we have to lay out generated files | ||
// in the same source directory with your code. | ||
"genDir": "./alt", | ||
"debug": true, | ||
"enableSummariesForJit": true, | ||
"alwaysCompileGeneratedCode": true | ||
}, | ||
|
||
"compilerOptions": { | ||
"target": "es5", | ||
"experimentalDecorators": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"skipLibCheck": true, | ||
"moduleResolution": "node", | ||
"rootDir": "", | ||
"declaration": true, | ||
"lib": ["es6", "dom"], | ||
"baseUrl": ".", | ||
// Prevent scanning up the directory tree for types | ||
"typeRoots": ["node_modules/@types"], | ||
"noUnusedLocals": true, | ||
"sourceMap": true | ||
}, | ||
|
||
"files": [ | ||
"src/module", | ||
"alt/src/bootstrap" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters