Questions tagged [angular-compiler]

98 questions
1
vote
1 answer

Angular 6 compilation error when using AOT

I am forced to use AOT recently and in production a template is not compiled properly. When I try on a blank project, it works great but in my giant application there is an issue. Something like this: @Component({ selector: 'app-c3', template:…
jsgoupil
  • 3,788
  • 3
  • 38
  • 53
1
vote
1 answer

Meteor build fails while processing files with angular-compilers: createCompilerHost is not a function

When I do ‘meteor build …/output --server-only’ for deploying, I am getting the error: this.compilerCli.createCompilerHost is not a function I upgraded the project Meteor@1.5.4.1 to Meteor@1.6.1.1, removed angular2-compilers and added…
1
vote
1 answer

Dynamically load Angular 4 template using existing component and module

I am attempting to load an HTML template received from the backend. This template includes custom pipes and should be populated with data that is received from a different web service. Here is an example of how it is currently set…
alberto_g
  • 39
  • 10
1
vote
2 answers

ERROR in Could not resolve module @angular/core

In a process of migration from webpack2 to webpack4 and from Angular4 to Angular5 I'm getting strange error for webpack compilation (./node_modules/.bin/webpack-cli): ERROR in Could not resolve module @angular/core Debugging webpack (node…
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
1
vote
0 answers

Compile scss with @import and $variables to rollupjs

I'm compiling my first angular library using rollupjs and I need your help :) Currently I have a structure like this: .src --components --component1 --component1.ts --component1.scss --component1.html --common …
soni
  • 687
  • 1
  • 8
  • 23
1
vote
1 answer

Angular 4 : Cli compiler issue with d.ts file when adding Angular material

I've added to my project angular material by installing npm install @angular/material and npm install @angular/cdk and now when I compile my app I am getting .d.ts file errors. I've checked my tsconfig.json file { "compileOnSave": false, …
Chris Tarasovs
  • 703
  • 2
  • 21
  • 54
1
vote
0 answers

SystemJS Error with Angular AOT: Uncaught (in promise): TypeError: ctor is not a constructor

I'm using Angular 4.4.1 + SystemJS 0.20.19 + NgBootstrap 1.0.0-beta.5 in an app. The app works in Angular JIT mode by following this instructions and having the following SystemJS configuration meta: { "./*": { "esModule": true …
1
vote
3 answers

How to tell Angular not to compile some part of template?

Practical case is pretty simple: I would like to provide documentation for my library that's for I want to paste examples of code there together with demo parts. So my question is: How to make one part compilable and executable but other one - just…
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
1
vote
1 answer

Angular Compiler options

I'm looking explanation for some Angular Compiler options that are listed here: useDebug - to switch on the debug useJit - not clear (used only in one place) defaultEncapsulation - to set default styles encapsulation providers - not really clear…
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
0
votes
1 answer

Angular compiler-cli error: Namespace 'ts' has no exported member 'ResolutionMode'

I am developing a web application with Angular 16 in Webstorm. The web application is currently pre-release and only has a small portion of minimum functionality completed. I was editing with ng serve running testing changes as I made them when…
CodeWarrior
  • 7,388
  • 7
  • 51
  • 78
0
votes
0 answers

Loading Component Template from Database or File

Is it possible to compile an HTML template from a database or .html file in real-time? An example use case would be storing Blog Article HTML in a database and loading dynamically into a component. Use [innerHTML] will NOT work if the template…
0
votes
0 answers

The requested module does not provide named export for transformAll, THIS_EXPR from @angular/compiler

I am working on a migration project. Need to migrate from angular 7 to angular latest. I see angular/cli 16 is the latest version. Few named exports are not found by the angular compiler for below. I searched in google, I couldn't any alternative…
0
votes
0 answers

My angular compiler is creating a ghost extra css rule

It appears the angular compiler is generating me a ghost rule for a scss selector '.features-icon-box h3' is generating .features-icon-box h3,.features-icon-box.h3 I have a regular website using Angular 15 and some (not too many) extra dependencies…
0
votes
0 answers

Angular Library - rootDir is expected to contain all source files

I'm working on angular library and creating each component as independent modules. I have created own ErrorStateMatcher & error config and placed it in different folder (./errors) so I can reuse them in other components. I'm getting following errors…
Johnny
  • 261
  • 7
  • 22
0
votes
0 answers

Error:Angular JIT compilation failed:'@angular/compiler' not loaded!JIT compilation is discouraged for production use-cases! Consider AOT mode instead

my app doesn't work in production in heroku but works fine in local my Package.json file: { "name": "Medica_Ligne", "version": "0.0.9", "scripts": { "ng": "ng", "start": "node server.js", "build": "ng build", "watch": "ng build…
Nidal
  • 1
  • 1