angular-cli

SystemJS 6.x set/register modules or provide mapping when dynamically loading module

五迷三道 提交于 2021-02-04 20:59:59
问题 I am trying to load modules dynamically with systemjs version 6.x in my Angular 8 application. Given there current documentation it looks like I can either user the SystemJS API to register or set a module programatically. https://github.com/systemjs/systemjs/blob/master/docs/api.md#systemsetid-module---module Trying this, however it doesn't look like systemjs is finding @angular/core import * as angularCore from '@angular/core'; System.set('@angular/core', angularCore); Should I be using set

Angular build watch for multiple libraries and and serve to another app

吃可爱长大的小学妹 提交于 2021-01-29 17:21:59
问题 I developing three helper angular libraries that consumed by another main application. The ideal is having live rebuild for the libaries while my main app import those libraies and run at the same time so I can have live reload for my main app during development process of the libraries. I found ng build --watch and I use it mutiple times with run-s for each of my libary then npm link the built folder then npm link my-libary in my main app. But the problem is when a libary is rebuilt, It

Angular Cli build command very slow to commence

让人想犯罪 __ 提交于 2021-01-29 11:00:30
问题 I am wondering if there is a log file for this. All of a sudden when I issue any ng command like ng --version or ng build it takes a long time to actually start, sometimes 10 minutes. Just yesterday, there was no time delay at all. This is the version I have and am using Angular 5: Angular CLI: 1.6.5 Node: 8.9.4 npm 5.6.0 OS: win32 x64 I am somewhat puzzled as I don't understand what has changed all of a sudden. 回答1: This problem occurs when there is problem in your node libraries. I had same

Copy assets as part of Angular 9 Library build

萝らか妹 提交于 2021-01-29 09:26:19
问题 I am reading this: https://angular.io/guide/creating-libraries and it states: Starting with version 9.x of the ng-packagr tool, you can configure the tool to automatically copy assets into your library package as part of the build process. You can use this feature when your library needs to publish optional theming files, Sass mixins, or documentation (like a changelog). And the link takes you here: https://github.com/ng-packagr/ng-packagr/blob/master/docs/copy-assets.md To me, that is so

How to dynamically create/modify sitemap.xml file in angular 9 project structure at runtime?

浪尽此生 提交于 2021-01-29 08:50:29
问题 How to create dynamic sitemap.xml file in Angular 9 project structure ? I can get data using HTTP get request from node API but using this data how can I update local xml file from angular project at runtime ? In my case, angular project and node project are on different server(different domain). And It is possible to create xml file in node project but I am not able to access that file as xml file in angular project root . Can anyone please suggest me how to use node xml in angular project

angular 7 build app - replace assets url with real url

試著忘記壹切 提交于 2021-01-29 05:21:12
问题 In an Angular 7 app i have different assets, images, fonts etc. All are located in src/assets/images or src/assets/fonts, etc I my files i use them like this: <img src="/assets/images/img.png"> angular.json look like this: ..... "assets": [ "src/favicon.ico", "src/assets" ] ..... When building I use: ng build --prod --build-optimizer --deploy-url=https://cdn.domain.com This will replace all the reference to assets resource from this: <img src="/assets/images/img.png"> to this: <img src="https

Error: npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586

我的未来我决定 提交于 2021-01-29 02:39:46
问题 Error while running: npm install -g angular-cli C:\Windows\System32>node -v v7.5.0 C:\Windows\System32>npm -v 4.1.2 C:\Users\Chiranjeevi>npm -v minimatch 4.1.2 ------------------------------------------------------------------------------------------- C:\Users\Chiranjeevi>npm install -g angular-cli npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue C:\Users\Chiranjeevi\AppData\Roaming\npm `-- (empty) npm WARN optional SKIPPING OPTIONAL

Error: npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586

℡╲_俬逩灬. 提交于 2021-01-29 02:33:04
问题 Error while running: npm install -g angular-cli C:\Windows\System32>node -v v7.5.0 C:\Windows\System32>npm -v 4.1.2 C:\Users\Chiranjeevi>npm -v minimatch 4.1.2 ------------------------------------------------------------------------------------------- C:\Users\Chiranjeevi>npm install -g angular-cli npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue C:\Users\Chiranjeevi\AppData\Roaming\npm `-- (empty) npm WARN optional SKIPPING OPTIONAL

Unable to execute command ng build in iis hosted asp.net web app using cmd.exe

痴心易碎 提交于 2021-01-28 11:46:48
问题 I want to execute ng build using c# code to build my angular project. I have hosted by c# application on IIS. When I am executing code I am getting error: ng' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n I have created another application that I have not hosted on IIS and I am executing that with locally using visual studio. In that same code is working property. I am unable to figure out issue with iis. My code is as below. private void

How to use ng-annotate with hybrid app based on angular-cli

孤街醉人 提交于 2021-01-28 09:24:03
问题 I'm working on an Angular.js project written with TypeScript. We're trying to evaluate whether to upgrade to Angular 8 and we're stuck with how to use ng-annotate with angular-cli's webpack configuration. I believe that this can be achieved either by using the @angular-builders/custom-webpack tool or by using ngx-build-plus tool but I had not succeeded with neither of them. My current attempt includes a partial webpack file for ngx-build-plus with the following configuration : module: { rules