Use angular2-aot for questions related to the Angular2 ahead-of-time compiler, which allows developers to deploy pre-compiled JavaScript code and HTML5 markup to the browser rather than TypeScript and Angular templates.
I'm building my angular 2 project with angular-cli. Locally I build it with no problem for prod ng build --prod --aot. When it is build on the server however the following errors are present:
...
[1m [31mERROR…
I'm attempting to build an Angular 2 project, using angular-cli with the --prod and --aot arguments. The build is failing with the following error:
Property 'required' does not exist on type '{ [key: string]: any; }'.
In my HTML, I'm using HTML…
I have an angular application currently configured with JIT, and it's working fine. I tried configuring it to work with AOT (Ahead of time) compilation.
Here's my work till now:
Here is my tsconfig-aot.ts:
{
"compileOnSave": true,
…
I've been converting a Webpack 1 application to version 2, mostly for the benefits of AOT compilation and tree-shaking. At present, the code compiles - but when I test it, the application crashes out because the Map class and its constructor can't…
I am getting below errors similar to below after updating to most recent version of angular cli
ERROR in Error encountered resolving symbol values statically.
Function calls are not supported. Consider replacing the function or
lambda with a…
I'm facing a problem trying to create a directive npm package.
I had already created packages for @Component but this is the first I create for @Directive.
The problem I'm facing is that when I run ng serve the build completes ok but when I load the…
In my angular application, back-end users can create custom templates. Those custom templates need to be loaded in the angular application at specific positions. I have a custom directive which gets templates
( based on the routes) from the CMS and…
My project is building on Linux and I've no idea why.
The distribution is Red Hat Enterprise Linux Server release 7.0.
My environment is:
"node" : "6.9.1"
"@angular/compiler-cli": "2.4.7",
"@ngtools/webpack": "1.2.11",
"typescript":…
I am using
"@angular/common": "2.3.0",
"@angular/compiler": "2.3.0",
"@angular/compiler-cli": "2.3.0",
"typescript": "2.0.3",
"webpack": "1.13.0",
When i am running
node_modules/.bin/ngc -p tsconfig-aot.json
I got this error:
can't…
I have an angular 2 application and am using ng2-dragula library. Everything is working in development (JIT compilation) mode. When I compile with AOT, the aot build and rollup are successful, but then I get this error in the browser:
Uncaught…
I'm building an Angular2 application. When I use the ng-tools/webpack loader, in the final build I get some svn folders in the dist repository.
How could I avoid the creation of svn folders?
Here is my webpack.js:
/**
* Webpack…
I am fetching part of the page from some service. How can I achieve that angular expression or router staff working as dynamic content?
Controller.ts
variable = 'some text';
dynamicContent ='
{{variable}}
Or
The routerLink works fine when I do a normal JIT build. But when I try to do an AOT build router link does not redirect to the specified route.
My html code
The project uses a third party library with no types defined. As the project is developed using Angular CLI (version 1.0.0-beta.29), the library is declared in typings.d.ts. In my case: declare module ‘xml2js-es6-promise’;
Project compiles and is…
In my sample Angular 2 SPA , I have used Webpack 2 module bundler in order
Bundle all my js files
Implement "Tree Shaking" to remove dead code and reduce bundle js file size
and to implement Ahead-of-time compilation to reduce the bundle js file…