angular-cli

Angular 2 CLI - Deployment to github user page shows readme page

寵の児 提交于 2020-06-14 04:09:29
问题 I have deployed my angular 2 project to my github user page via angular CLI. I tried out the steps from official angular 2 cli page. However when I try to access the github url it shows the contents of readme file. Both the user page and user-page/baseUrl does the same. I have used routing which works in the local environment. I’m not sure if I should modify the production environment variables or baseUrl. Link to the repository: https://github.com/nirmalks/nirmalks.github.io 回答1: You should

Code Coverage report shown only for polyfills.ts and test.ts under Dev\ folder. Doest show coverage for files under src folder

你说的曾经没有我的故事 提交于 2020-06-09 07:08:06
问题 In my angular 7 app, when i run "ng test --watch=false --code-coverage true" i get the coverage report in my coverage folder, but coverage is shown only for two files. (Polyfills.ts & test.ts). Below is my project structure. Please let me know how to get coverage for files under SRC folder. Note: when i run ng test all the tests under SRC folder is getting executed. dev --app --test.ts --tsconfig.app.json --tsconfig.spec.json src --lib --component --services angular.json karma.conf.json test

Memory quota exceeded after angular bitbucket heroku deployment

被刻印的时光 ゝ 提交于 2020-06-01 06:44:05
问题 I am trying to make a Bitbucket pipeline which will deploy the app to the Heroku. It deploys but on Heroku I am getting 2019-04-01T19:47:11.305401+00:00 app[web.1]: [34mℹ[39m [90m「wdm」[39m: Compiled successfully. 2019-04-01T19:47:18.311170+00:00 heroku[web.1]: Process running mem=571M(111.6%) 2019-04-01T19:47:18.311170+00:00 heroku[web.1]: Error R14 (Memory quota exceeded) 2019-04-01T19:47:40.049088+00:00 heroku[web.1]: Process running mem=558M(109.0%) 2019-04-01T19:47:40.049160+00:00 heroku

Angular 6 - RouterLink navigates but not changing URL

孤街醉人 提交于 2020-05-31 08:06:42
问题 app.component.html <nav> <a routerLink="/dashboard"></a> <a routerLink="/reports"></a> <nav> <main role="main" class="page-container"> <router-outlet></router-outlet> </main> app-routing.module.ts import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { DashboardComponent } from './dashboard/dashboard.component'; import { ReportsComponent } from './reports/reports.component'; const routes: Routes = [ { path: 'dashboard', component:

ng update never updates @angular/core version

狂风中的少年 提交于 2020-05-30 10:41:49
问题 I run the command ng update We analyzed your package.json, there are some packages to update: Name Version Command to update ----------------------------------------------------------------------------------- @angular/core 9.0.7 -> 9.1.0 ng update @angular/core so I run ng update @angular/core and it says Package '@angular/core' is already up to date. How can I resolve this issue? ng v Angular CLI: 9.1.0 Node: 13.9.0 OS: win32 x64 Angular: 9.1.0 ... cli, core, forms, localize Ivy Workspace:

ng update never updates @angular/core version

自作多情 提交于 2020-05-30 10:41:32
问题 I run the command ng update We analyzed your package.json, there are some packages to update: Name Version Command to update ----------------------------------------------------------------------------------- @angular/core 9.0.7 -> 9.1.0 ng update @angular/core so I run ng update @angular/core and it says Package '@angular/core' is already up to date. How can I resolve this issue? ng v Angular CLI: 9.1.0 Node: 13.9.0 OS: win32 x64 Angular: 9.1.0 ... cli, core, forms, localize Ivy Workspace:

CLI CORS Proxy not changing origin, still get 403 on API reqs?

怎甘沉沦 提交于 2020-05-29 04:38:07
问题 Yes, I've found a ton of stuff similar but still not resolved for my instance. I would like to avoid killing the browser side security and instead let the proxy do its job but I fear I'm missing some inane detail in the setup and I'm no CORS expert by any means. So, what I get...a 403; Failed to load http://localhost:10000/some/rest/endpoint: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin

Webpack/Angular CLI - how to embed scripts in HTML instead of referencing them?

五迷三道 提交于 2020-05-17 06:24:25
问题 I'm building a lean Angular app that should be ran locally through file:// URL. The index.html file will be attached and deployed through a headless browser and I cannot use a HTTP server as a solution. Running the file locally would bring up Cross Origin errors as described here. The solution I came up with, which works (!) is to replace all <script src="..."/> resources (which are bundled with ng build --prod ) with <script>...</script> . At the moment, I'm doing it manually . With the

Webpack/Angular CLI - how to embed scripts in HTML instead of referencing them?

ぐ巨炮叔叔 提交于 2020-05-17 06:24:04
问题 I'm building a lean Angular app that should be ran locally through file:// URL. The index.html file will be attached and deployed through a headless browser and I cannot use a HTTP server as a solution. Running the file locally would bring up Cross Origin errors as described here. The solution I came up with, which works (!) is to replace all <script src="..."/> resources (which are bundled with ng build --prod ) with <script>...</script> . At the moment, I'm doing it manually . With the

Angular compilation slow

橙三吉。 提交于 2020-05-15 05:36:06
问题 I have an API in Symfony-PHP , which I test it with postman and it works like a charm. But when I do ng serve --aot --optimization the application starts to build and the message of compiled successfully. takes more than a minute. When I need to make a change to an html component such as a letter, it re-compiles the entire project and takes too long for such a small change. The --watch parameter is set to true by default, which is ok. I don't know if anyone knows why this compilation is so