angular-cli-v6

ASP.NET Core 2.1 Angular 6.0 SPA template - razor page (cshtml) for index instead static page

纵然是瞬间 提交于 2019-12-17 16:26:40
问题 I am trying to migrate my ASP.NET Core 2.0 Angular 5 application with webpack setup to ASP.NET Core 2.1 Angular 6 with Angular-Cli . Short question: How can I force parsing razor pages directives from cshtml with Microsoft.AspNetCore.SpaServices.Extensions ? I do not want to use index.html from Angular.json , but index.cshtml . Long description: I started a new ASP.NET Core project from Angular template. There are quite a few things that just magically works. There is an index.html file

Turning progress display off globally for angular-cli v6

你说的曾经没有我的故事 提交于 2019-12-11 08:08:31
问题 Upgraded to Angular 6. Now I want to turn progress display off globally for ng build . However, the documentation about the ng config command which apparently replaced ng set/get seems to be missing or out-of-date. I think I need to do the following: ng config --global some.path.progress false But I can't figure out what the some.path part needs to be. Whatever I try I get an "Invalid path" error. Of course I could also just edit ~/.angular.json , if I knew what the right hierarchy of keys

Error While Starting Angular Cli Server

丶灬走出姿态 提交于 2019-12-11 06:24:56
问题 I Just Generated my Application on WebStorm. When I run command ng serve this shows this error. ERROR in ./ansi-html Module parse failed: Unexpected character '#' (1:0) You may need an appropriate loader to handle this file type. | #!/bin/sh | basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") | i 「wdm」: Failed to compile. 来源: https://stackoverflow.com/questions/51008349/error-while-starting-angular-cli-server

Angular CLI 6 - ng build doesn't produce Server bundles

非 Y 不嫁゛ 提交于 2019-12-10 20:10:05
问题 I am following the official Angular Universal guide available at https://angular.io/guide/universal but when I run ng build --prod it does produce client bundles but doesn't produce server bundles. Since my environment is ASP.Net Core, I have skipped Universal Webpack configuration and server.ts . With previous version of Angular CLI we were able to build server bundle by specifying app while building ng build --app=ssr Am I missing something? Can anyone please help? 回答1: Fix: One thing

AngularCLI and Angular Material (schematics) error: Collection “@angular/material” cannot be resolved

我与影子孤独终老i 提交于 2019-12-09 07:59:29
问题 I am trying to use the Angular schemats that are shown on this page. When I try to use this following command in the terminal at the root of the project ng generate @angular/material:material-nav --name name-of-new-nav , I get the following error in red, Collection "@angular/material" cannot be resolved. Error: Collection "@angular/material" cannot be resolved. at NodeModulesEngineHost._resolveCollectionPath (/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/

Angular 6: How to install a previous version of Angular project

左心房为你撑大大i 提交于 2019-12-07 08:56:55
问题 How I can install a previous version of Angular project with the current Angular-cli version (Angular 6). I found a command but is deprecated: ng new my_project --ng4 回答1: Since you want to use angular-cli to create new project, you need to install the version of @angular/cli that scaffolds angular 4 project. Version of @angular/cli which scaffolds the Angular 4 project is 1.4.9 . So, using npm, do npm install @angular/cli@1.4.9 , then use angular-cli commands. 回答2: You can just have package

Bootstrap 4.1.1 Navbar not working with Angular 6

試著忘記壹切 提交于 2019-12-07 05:53:55
问题 I have been trying to work on Navbar with collapse menu and dropdown link using Bootstrap 4.1.1 and Angular 6 but somehow Navbar is not working at all. I can see elements correctly but they don't function as intended. I installed Bootstrap via Angular CLI using 'ng install bootstrap --save' and Bootstrap dependencies: 'ng install jquery --save' and 'ng install popper.js --save' I also included Bootstrap, jquery and popper.js in package.json and angular.json package.json: "dependencies": { "

Angular Module vs. Library

主宰稳场 提交于 2019-12-06 07:11:11
So great, the Angular has released version 6 and the CLI provides an option to generate libraries - something that they call a "highly anticipated feature". Now, coming from a business perspective, I am wondering: why you would actually need this, why inside of an existing project and not a separate which you can install as usual via npm... and if you want this inside your project, why not use a module for that. So I get it, publish something on npmjs and hope the whole world and future connected things need exactly that. Library, great. Inside a big system in a even bigger company, we could

ng-cli 6 and font awesome icons not working

对着背影说爱祢 提交于 2019-12-06 02:47:46
问题 I am using font-awesome 4.70, angular 6.0.8, and cli 6.0.8(full versioning below) I am trying to replace our existing webpack process with the cli's "ng build". I have run into an issue with font awesome's icons not showing up. I have seen similar issues in the past with older versions but I havent found a solution yet. I have the fonts hooked up in my assets assets:[ "./node_modules/font-awesome/fonts", //other assets ] And I am including the css in the styles portion of my angula.json

Error when creating new project with Angular-CLI 6.1.2

不想你离开。 提交于 2019-12-05 14:31:36
问题 I tried creating a new Angular project using ng new angular-6-boilerplate but I can't do it anymore with angular-cli latest version. I'm using terminal for windows to create my project but I got this error. Schematic input does not validate against the Schema: {"name":"angular-6-boilerplate","version":"6.1.2","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null} Errors: Data path ".name" should match format "html-selector". Why am I getting this error?