angular7

“viewFullscreen” menu item is not showing in the context menu of highcharts 6.2.0

筅森魡賤 提交于 2021-01-29 01:37:51
问题 I have a highchart line chart which currently displayed in bootstrap 4 card. I want it to displayed full screen, which I'm currently aware that highchart 6.2.0 has option to enabled exporting file, so that I can use the exporting context menu. so, I enabled them but "showFullscreen" option not showing in the exporting context menu. I imported highchart and exporting module to the component. in the documentation highchart guys says that I have to include viewFullscreen as string to the

has been blocked by CORS policy: Response to preflight request doesn't pass

十年热恋 提交于 2021-01-28 22:57:04
问题 I have created one app using angular and springboot for basic authentication with spring security but i am getting 401 error ..i am novice in springboot @Configuration @EnableWebSecurity public class SpringSecurityConfigurationBasicAuth extends WebSecurityConfigurerAdapter{ @Override protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .authorizeRequests() .antMatchers(HttpMethod.OPTIONS,"/**").permitAll() .anyRequest().authenticated() .and() //.formLogin()

Angular 7 : problem while trying to using a method service in a component

让人想犯罪 __ 提交于 2021-01-28 16:46:47
问题 I'm trying to learn how to use Angular 7. I follow the guide on his official site and now I want to do a Form for try to calculate the fiscal code ( for italian people only ). The user will insert the data for calculate it and when you start to type your fiscal code the program in background start to calculate it and when they are equal the form will stamp a message that say: "Right" or something like that. I made a service to do the calculation and validate it with a custom validator a get

Angular 7 : problem while trying to using a method service in a component

旧时模样 提交于 2021-01-28 16:44:30
问题 I'm trying to learn how to use Angular 7. I follow the guide on his official site and now I want to do a Form for try to calculate the fiscal code ( for italian people only ). The user will insert the data for calculate it and when you start to type your fiscal code the program in background start to calculate it and when they are equal the form will stamp a message that say: "Right" or something like that. I made a service to do the calculation and validate it with a custom validator a get

option with hidden attribute not working in IE

一个人想着一个人 提交于 2021-01-28 12:45:42
问题 The following code should display dropdown with some options where first of them is only used as a dropdown's title - it's disabled and should not be present on the list of options. However it's not working in IE (working fine in Firefox), "Select value" is visible (but as disabled option) on the list. <select> <option [ngValue]="undefined" hidden disabled>Select value</option> <option *ngFor="let value of values" [ngValue]="value"> {{value}} </option> </select> 来源: https://stackoverflow.com

option with hidden attribute not working in IE

亡梦爱人 提交于 2021-01-28 12:43:09
问题 The following code should display dropdown with some options where first of them is only used as a dropdown's title - it's disabled and should not be present on the list of options. However it's not working in IE (working fine in Firefox), "Select value" is visible (but as disabled option) on the list. <select> <option [ngValue]="undefined" hidden disabled>Select value</option> <option *ngFor="let value of values" [ngValue]="value"> {{value}} </option> </select> 来源: https://stackoverflow.com

Angular 7 and form arrays error of cannot find a control with path

时间秒杀一切 提交于 2021-01-28 11:25:32
问题 I am building a form group with an array inside of it, using mat-table data source. I started by creating the table: <form *ngIf="formGroup" [formGroup]="formGroup"> <table mat-table [dataSource]="dataSource" *ngIf="total>0" formArrayName="distribution"> <ng-container matColumnDef="ind_id"> <th mat-header-cell *matHeaderCellDef> ID </th> <td mat-cell *matCellDef="let element">{{element.individual_id}}</td> </ng-container> <ng-container matColumnDef="ind_name"> <th mat-header-cell

Angular 7: Post request always send a null body

梦想的初衷 提交于 2021-01-28 05:37:24
问题 I'm trying to understand this issue i had for days now, so i want to send a post request with username and password using angular 7 to a nodejs rest api for authentication but it sends an empty body here is the login method in authservice.ts: login(username: string, password: string): Observable<any> { let httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Accepts': 'application/json' }) }; return this.http.post<any>( `${this.HOST_DOMAINE}/bo/api/authenticate`, {

Apply a directive on a DOM element using getElementById in angular 7

雨燕双飞 提交于 2021-01-28 02:12:04
问题 I have some HTML generated by a third party (plotly), and I would love to apply a directive that we already have on one of the DOM elements it creates. The directive opens a colorPicker on click and sets colors to strings. I can reach the element with querySelector , or getElementById , but how can I transform / wrap it into angular can add a directive to? I tried: const el = document.getElementById('myEl'); const comp = new ElementRef(el) or: const comp = this.renderer.selectRootElement(el)

Angular Dynamic Components AOT Issue

安稳与你 提交于 2021-01-28 02:07:35
问题 Due to some business logic, I have to read the meta data of dynamic components(EntryComponents). To read the meta data, following is my approach. Read all components of a module using ComponentFactoryResolver Filter out classes using Component name and specific method Create the component and read the data Destroy the component. . const factories = Array.from<any>(this.resolver['_factories'].keys()); console.log(factories); // Logging all the factories factories.forEach(element => { if