angular5

How can I put my Extjs 4.2.x project inside latest Angular App

℡╲_俬逩灬. 提交于 2020-01-05 08:01:45
问题 I have a large app built in Ext4.2.x. Now the requirement is to do further development in Angular. I am trying to create a wrapper of Angular around Ext app so that we can use angular for further development/ migration of code piece by piece. till the time both the framework should work in harmony. Approach I am trying: I have created app(name is: NgApp ) scaffolding using angular-cli and put that code inside the root directory of Ext app( ExtNg ). Created a folder( ExtNg/NgBuild )to hold the

Angular 5 with materialize css

﹥>﹥吖頭↗ 提交于 2020-01-05 07:40:11
问题 I'm learning angular 5. but I was following this tutorial to import materialize css module to my app. Ang with angular2materialize then I run ng serve and it compiled successfully. but when I load the content it return an error Uncaught Error: Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize. how should I proceed? 回答1: Use import 'materialize-css'; before import {MaterializeModule}

Angular 5 HttpClient Post List to Web Api - always null?

依然范特西╮ 提交于 2020-01-05 06:44:10
问题 The setup is Angular 5 and .net core Web Api. At the controller, model binding always results in null while trying to bind to a complex object. Code is provided below. This example is adapted from another SO answer . but its not working for me. Controller: [Route("demopost1")] [HttpPost] public async Task < IntResultEntity > DemoPostList1([FromBody]DemoPostViewModel payload) { return await Task.FromResult(new IntResultEntity { Result = 0 }); } Models: public class DemoPostModel { public

Angular 5 HttpClient Post List to Web Api - always null?

旧城冷巷雨未停 提交于 2020-01-05 06:44:05
问题 The setup is Angular 5 and .net core Web Api. At the controller, model binding always results in null while trying to bind to a complex object. Code is provided below. This example is adapted from another SO answer . but its not working for me. Controller: [Route("demopost1")] [HttpPost] public async Task < IntResultEntity > DemoPostList1([FromBody]DemoPostViewModel payload) { return await Task.FromResult(new IntResultEntity { Result = 0 }); } Models: public class DemoPostModel { public

Typescript debugging not working in Visual Studio 2017

混江龙づ霸主 提交于 2020-01-05 03:04:27
问题 I'm using Visual Studio 2017 version 15.5.7 for my .NET web API project and I'm using Syncfusion's angular controls with systemJS for UI. Problem is, that I cannot debug typescript at all. I can place a breakpoint and it appears like normal regular breakepoint until i hit debug, then it becomes unavailable with message: The breakpoint will not currently be hit. No code has been loaded for this code location. I tried debugging with Chrome, Firefox, Edge and IE, but to no avail. .map files are

Font awesome icons not showing up in Angular 5

独自空忆成欢 提交于 2020-01-04 14:13:01
问题 I installed it according to the instructions. First I've typed npm install --save font-awesome angular-font-awesome And it installed everything correctly. Then I changed in .angular-cli.json to contain the css like so: "styles": [ "styles.css", "../node_modules/font-awesome/css/font-awesome.min.css" ], And when I type this in the html: <span class="fas fa-chevron-left"></span> It does not show anything at all for it. I don't have errors either but in sources I can't find anything related to

Angular 5 response header is missing on CORS

时光总嘲笑我的痴心妄想 提交于 2020-01-04 12:18:07
问题 In my angular app, I need to retrieve Location data from the response header. The server (Nginx) is configured to allow cross origin and to allow/expose location in header. I can see this in the chrome DEV console but in my angular app, I don't see any data for the header. Access-Control-Allow-Origin: * Access-Control-Allow-Headers:Location, Content-Type Access-Control-Expose-Headers:Location, Content-Type Here is my code snippet. this.httpClient.post( url, { UserName: username, Password:

Remove duplicate names in a column

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 01:12:22
问题 In my angular 6 application, i am making a table with the contents from products array like, Ts: products: any = { "productOne": [ { "id": 1, "product_name": "Product One", "productOneProperties": [ { "id": 1, "property_name": "Length", "property_value": "12cm" }, { "id": 2, "property_name": "Width", "property_value": "10cm" }, { "id": 3, "property_name": "Height", "property_value": "20cm" }, ] } ], "productTwo": [ { "id": 2, "product_name": "Product Two", "productTwoProperties": [ { "id": 1,

[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:

How change color property of mat-slide-toggle/ overwrite Css in components

微笑、不失礼 提交于 2020-01-02 02:21:10
问题 I there any way to change color property of mat-slide-toggle Or Can suggest me any slide toggle to angular 5 application like material slide toggle. How to overwrite css?... 回答1: I think you can overwrite the default css of this component. You can see the example here 回答2: You can change the primary colour of the mat-slide-toggle with the below css in your component styles. /deep/ .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar { background-color: #49c5b6; } /deep/ .mat