angular-cli

how to use Angular CLI Project Template in ASP.NET Core project in Visual Studio

半世苍凉 提交于 2020-01-02 22:12:51
问题 I found a marketplace template(Angular CLI Project Template) for creating and configuring an Angular CLI project in Visual Studio. When I download and install .VSIX file from the marketplace, the error: The extension cannot be installed to this product due to prerequisites that cannot be resolved appears. I have installed Visual Studio 2017, Node.js and Angular CLI on my computer. I know that there are many manual configurations for matching Angular CLI with ASP.NET Core but this template

How to configure Angular 4 behind Proxy?

ぐ巨炮叔叔 提交于 2020-01-02 20:09:11
问题 I'm trying to use angular 4 application behind a proxy server (I'm using zuul as proxy server), since I'm using context path routing, I've configured zuul routes with context path. Below is the zuul routes configuration. kp-app1: path: /kp-app1/** retryable: true serviceId: kp-app1 strip-prefix: false Since Angular runs with baseurl=/ I manually edited index.html and added /kp-app1/ . After much of struggle analyzing packets flow using wireshark, I figured out that though index.html is

Angular Cli Lazy Load WIth MVC5 Application

笑着哭i 提交于 2020-01-02 08:47:27
问题 I am building MVC5 application with Angular 4 and I am using Angular Cli to create angular app. The problem I am facing I have MVC5 application running on port 5011 while angular app using angular cli using a port 4200. When I run the MVC application everything work fine except lazy loaded module. Because lazy loaded module create chunks.js and those chunks are giving error not found. But all other js loaded successfully. Here is the problem loading chunks.js My MVC application use port 5011

[Angular-CLI-6]Could not determine single project for 'Serve' target

▼魔方 西西 提交于 2020-01-02 03:32:26
问题 I have updated my angular-cli with the help of ng update @angular/cli command. After that, I have got an error as Could not determine single project for 'server' target with following error trace. Could not determine a single project for the 'serve' target. Error: Could not determine a single project for the 'serve' target. at ServeCommand.getProjectNamesByTarget (E:\Angular\Projects\projectName\node_modules\@angular\cli\models\architect-command.js:175:19) at ServeCommand.<anonymous> (E:

Access process.env in environment.ts file created from the angular-cli

别来无恙 提交于 2020-01-02 03:06:12
问题 I have an angular-cli application (angular version 4.0.0). I want to be able to access my environment variables in the environment.ts file created from the cli. Example: export SOME_VARIABLE=exampleValue When I build my angular app I want "exampleValue" to be populated in the SOME_VARIABLE field. // environment.ts export const environment = { production: false, SOME_VARIABLE: process.env.SOME_VARIABLE }; Unfortunately, process.env isn't available in this file. How can I gain access to it? 回答1

Can not read property 'NullLogger' of undefined (angular/cli 1.4.7)

依然范特西╮ 提交于 2020-01-02 02:53:07
问题 Today, sudeenly I start getting this error "Cannot read property 'NullLogger' of undefined" while trying to add a component ( ng g c abc) in my angular 4 app. When I searched it on google, people are suggesting that we need to update our cli version to 1.4.10 . But the question is why we are getting this error now for all angular/cli version below 1.4.10? . I do not want to update my CLI version now. Does anyone know why is it happening?? Following is my package.json file, "dependencies": { "

Why powershell does not run Angular commands? [duplicate]

筅森魡賤 提交于 2020-01-02 00:54:09
问题 This question already has answers here : PowerShell says “execution of scripts is disabled on this system.” (22 answers) Closed last month . I have started to learn Angular but I note that powershell in Windows gives me an error whenever I make an angular command like: ng new new-app or ng serve this is the error what I got: ng : File C:\Users\< username >\AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution

What is the difference between Angular CLI and quickstart?

纵饮孤独 提交于 2020-01-02 00:37:08
问题 I have been watching some videos that related to angularJS 2, but i would like to know What is the difference between Angular CLI and quickstart? 回答1: Angular-CLI is a TOOL to create your angular 2 application. It provides commands to generate code such as components, services and directives to make angular 2 development easier to the developer. It also allows you to build your application and serve your application as you are developing. Angular 2 Quick Start is a TUTORIAL to create a simple

It's possible to insert angular environment variable into scss?

与世无争的帅哥 提交于 2020-01-01 19:52:15
问题 I'm trying to find a way to change how my scss is compiled based on a "profile" variable environment. My app will be installed on different locations, witch with different theme, but all the css is the same. I just need to change what color palette will be used, during compilation. My app already have on the environments.ts a profile variable, that will be used for brand image . I was thinking in something like: export const environment = { production: true, profile: 'appX' apiUrl: 'http:/

How to use Angular-CLI with Visual Studio 2017 Without Build “Errors”

血红的双手。 提交于 2020-01-01 10:17:05
问题 The problem I've encountered is in a solution with many projects (one of them being a angular-cli project targeting es5) is that, since Microsoft developed Typescript, they are over eager to attempt to compile without fully knowing the angular-cli story. Therefore (TS) errors frustratingly crop up frequently between builds and hide what would otherwise be a valid error. How can I ensure that Visual Studio will ignore these Typescript errors and not show them at all post-build? 回答1: Turns out,