ng-build

Unable to change or give custom CSS for ng-datepicker

流过昼夜 提交于 2019-12-11 06:35:11
问题 I am trying to give custom CSS for bs-datepicker. But, its not accepting any change from component.css. I tried adding a class name in the node file of bs-datepicker in node_modules and making css changes using that class name, but the changes are not reflecting when I build the application using ng-build. Whatever change I make in node modules, they are reflecting in ng serve local view, but in ng-build , no changes are reflecting.The image of bs-datepicker is attached here I want to change

Angular 7 library html-template changes are not affected into application when concurrently running ng build --watch and ng serve

空扰寡人 提交于 2019-12-11 06:13:21
问题 Angular 7 library html-template changes are not affected into Angular application when they are running concurrently in different cmd using "ng build library --watch" and "ng serve application". So I first start library with watch flag on, then I start application with ng serve. Changes in library into ts files will start HMR on application and changes are affected correctly. But when I change some components html or css files HMR will detect change and start to update application but changes

ng build throws error: “Tried to find bootstrap code, but could not.”

爷,独闯天下 提交于 2019-12-11 04:27:06
问题 When trying to build my app with ng-build , I get the following error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options. My main file as specified in .angular-cli.json is pretty straightforward: import { NgModule } from '@angular/core'; import { LoginComponent } from './login.component'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import

ng build failed to execute 'replaceState' on 'History': A history state object with URL cannot be created in a document with origin 'null' and URL

萝らか妹 提交于 2019-12-11 01:57:19
问题 I am using Google Chrome version 52 and I want to be able to run my application locally without a server by accessing index.html. I am able to hit the landing page of my application. However, when I try to navigate to another page or click on any buttons, it is unable to work. I have tried many ways, such as: Add script before import reference one and reference two Changing base href from / to ./ Changing router configurations to use hash and changing base href to <script>document.write('

When running ng build, the index.html does nothing?

假装没事ソ 提交于 2019-12-09 13:38:28
问题 I have an Angular 5 project, and it works fine when running ng serve, but I want to send it to a designer to work on it further. After running ng build, opening the index.html results in a completely blank page. Is there something else I need to do? In my environment.ts folder, I have production set to true. Please let me know if there is an easier way to send a simulation or how to fix this one, thanks! 回答1: Most likely it's the <base href=""> settings. Let's say we have an angular-cli

When running ng build, the index.html does nothing?

拈花ヽ惹草 提交于 2019-12-03 17:33:23
I have an Angular 5 project, and it works fine when running ng serve, but I want to send it to a designer to work on it further. After running ng build, opening the index.html results in a completely blank page. Is there something else I need to do? In my environment.ts folder, I have production set to true. Please let me know if there is an easier way to send a simulation or how to fix this one, thanks! Most likely it's the <base href=""> settings. Let's say we have an angular-cli-created project called, "foo". When we run ng build --prod , by default, Angular will output dist/foo without any

Angular 8 ng-build throwing MIME error with cordova

别等时光非礼了梦想. 提交于 2019-12-03 15:20:36
问题 While executing ng build --prod --base-href ./ for building my cordova app, the final output throws an error as below. Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec. I did end up fixing this by changing type module to text/javascript src="runtime-es2015.858f8dd898b75fe86926.js" type="module"> src="runtime-es2015.858f8dd898b75fe86926.js" type="text/javascript"> Is there something

WARNING in budgets, maximum exceeded for initial

元气小坏坏 提交于 2019-12-03 02:57:19
问题 When build my angular 7 project with --prod, i have a warning in budgets. I have a angular 7 project, i want to build it, but i have a warning: WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB these are chunk details: chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB [rendered] chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered] chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered] chunk {2}

Improving production build time for Angular 7 application

守給你的承諾、 提交于 2019-11-30 13:31:18
My application takes a very long time to build for production using ng build --prod Sometimes it even fails with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory Is there something I can do to reduce the build time? There are some things that can be done to reduce the build time. Increase the memory limit of the build process The build command is executed by node where a single process has a maximum memory limit of 1.76 GB on 64bit machines. It can be increased by adding the --max-old-space-size argument to the build command Since this

How to allow access outside localhost

泄露秘密 提交于 2019-11-29 19:24:52
How can I allow access outside localhost at Angular2 ? I can navigate at localhost:3030/panel easily but I can not navigate when I write my IP such like 10.123.14.12:3030/panel/ . Could you please allow me how to fix it ? I am not using npm (node project manage - node install / node start ) to install and run the project. If you want , I can provide my package.json and index.html . mast3rd3mon Using ng serve --host 0.0.0.0 will allow you to connect to the ng serve using your ip instead of localhost . EDIT In newer versions of the cli, you have to provide your local ip address instead EDIT 2 In