Hello- am trying to package the angular CLI 8.x version and install. But it is looking to answer the google analytics prompt. Am trying to automate this and deploy this in a few hundred machines, is there a way that this question does not have to be answered during install. More information about this "https://github.com/angular/angular/blob/master/aio/content/marketing/analytics.md", when doing a package install pushing to other machines it gets tricky and is expecting a user prompt. Any advise on how to get around this., thanks.
--some-variable etc...
Is there a way to run ng g c person with a flag to only return impacted paths rather than <ACTION> path (size)?
I realize that this is a weird question, but I'm about to start teaching a course on Angular and want to do a brief dive into TS first. We'll be building a simple, immature VSCode extension that wraps the Angular CLI and I want to take created files from the generate command and open them. We could use RegEx, but that seems to be a potentially unstable solution...
@sliceofbytes I’ve gone through a series of different errors but the I first ran into a zone.js error:
Uncaught Error: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.Which I researched and found out that it’s better for angular components to use a push strategy for change detection so I removed zone.js from my component which got rid of that error.
Next error I received was:
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name “app-my-button" has already been used with this registryWhich I was able to resolve with a check if (!customElements.get('element')) customElements.define('element', buttonElement);
Now that I’ve added that check, in production, my page does not load (no console errors either). Since I used angular CLI to create my elements project and combined all of my .js files into one, I’m thinking there must be some sort of conflict between my elements .js file and the .js file of the angular application that I’m using my element.js file in. I’ve been up for days trying to resolve this. I initially followed: https://blog.bitsrc.io/using-angular-elements-why-and-how-part-1-35f7fd4f0457 to create my web component (it’s more or less the same as other articles I’ve read). Locally everything runs as expected.
hey there, I'm having troubles with AOT and after hours of Googling I can't find a solution. Let me be concise, I load two different components depending on a property of environments
const routes = [{
//...
component: environment.foo ? FooComponent : BarComponent
}];What's special in my project is that environment.ts file is lazy loaded, so same Docker container runs on different environments
// environment.ts
export const environment = (window as any).__env;The issue is that when I run ng build with AoT enabled this is generated:
const routes = [{
//...
component: BarComponent
}];It's like AoT is evaluating environment.foo on build time, can I prevent that?
@alan-agius4 Thanks a lot for angular/angular-cli#15453
Hopefully that's resolved one day. It's really ticking my nerves though :(