docs(aio): fix aot-compiler example to work with Angular v5 (#19511)
PR Close #19511
This commit is contained in:
parent
142a2b7341
commit
9fe6363575
|
@ -29,11 +29,7 @@
|
||||||
# built files
|
# built files
|
||||||
*.map
|
*.map
|
||||||
_test-output
|
_test-output
|
||||||
protractor-helpers.js
|
|
||||||
*/e2e-spec.js
|
|
||||||
**/*.js
|
**/*.js
|
||||||
**/ts/**/*.js
|
|
||||||
**/js-es6*/**/*.js
|
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,10 +53,10 @@ dist/
|
||||||
**/app/**/*.ajs.js
|
**/app/**/*.ajs.js
|
||||||
|
|
||||||
# aot
|
# aot
|
||||||
*/aot/**/*
|
**/*.ngsummary.json
|
||||||
!*/aot/bs-config.json
|
|
||||||
!*/aot/index.html
|
|
||||||
!rollup-config.js
|
!rollup-config.js
|
||||||
|
aot-compiler/**/*.d.ts
|
||||||
|
aot-compiler/**/*.factory.d.ts
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
!i18n/src/systemjs-text-plugin.js
|
!i18n/src/systemjs-text-plugin.js
|
||||||
|
|
|
@ -7,7 +7,7 @@ import uglify from 'rollup-plugin-uglify';
|
||||||
export default {
|
export default {
|
||||||
entry: 'src/main.js',
|
entry: 'src/main.js',
|
||||||
dest: 'src/build.js', // output a single application bundle
|
dest: 'src/build.js', // output a single application bundle
|
||||||
sourceMap: false,
|
sourceMap: true,
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
onwarn: function(warning) {
|
onwarn: function(warning) {
|
||||||
// Skip certain warnings
|
// Skip certain warnings
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// #docregion
|
// #docregion
|
||||||
import { platformBrowser } from '@angular/platform-browser';
|
import { platformBrowser } from '@angular/platform-browser';
|
||||||
import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory';
|
import { AppModuleNgFactory } from './app/app.module.ngfactory';
|
||||||
|
|
||||||
console.log('Running AOT compiled');
|
console.log('Running AOT compiled');
|
||||||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"lib": ["es2015", "dom"],
|
"lib": ["es2015", "dom"],
|
||||||
"noImplicitAny": true,
|
|
||||||
"suppressImplicitAnyIndexErrors": true,
|
"suppressImplicitAnyIndexErrors": true,
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types/"
|
"./node_modules/@types/"
|
||||||
|
@ -20,7 +19,8 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"genDir": "aot",
|
"annotationsAs": "decorators",
|
||||||
"skipMetadataEmit" : true
|
"genDir": ".",
|
||||||
}
|
"skipMetadataEmit" : true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,6 @@ const SJS_SPEC_FILENAME = 'e2e-spec.ts';
|
||||||
const CLI_SPEC_FILENAME = 'e2e/app.e2e-spec.ts';
|
const CLI_SPEC_FILENAME = 'e2e/app.e2e-spec.ts';
|
||||||
const EXAMPLE_CONFIG_FILENAME = 'example-config.json';
|
const EXAMPLE_CONFIG_FILENAME = 'example-config.json';
|
||||||
const IGNORED_EXAMPLES = [ // temporary ignores
|
const IGNORED_EXAMPLES = [ // temporary ignores
|
||||||
'aot-compiler', // Temporarily disabled until we figure out how to make it pass with the latest ngc.
|
|
||||||
|
|
||||||
'toh-',
|
'toh-',
|
||||||
'quickstart',
|
'quickstart',
|
||||||
'http',
|
'http',
|
||||||
|
|
Loading…
Reference in New Issue