angular5

Angular `ng build --prod` issue

旧时模样 提交于 2019-12-25 01:44:50
问题 when i did --> 'ng build --prod' i got this error ERROR in : Cannot determine the module for class AppComponent in E:/GitNew/Terminal2/Terminal2/terminal2/src/app/app.component.ts! Add AppComponent to the NgModule to fix it. Cannot determine the module for class OfferCreationFinalForwarderComponent in E:/GitNew/Terminal2/Terminal2/terminal2/src/app/offer-creation-final- forwarder/offer-creation-final-forwarder.component.ts! Add OfferCreationFinalForwarderComponent to the NgModule to fix it.

Module not found: Error: Can't resolve './app.module.ngfactory' - ionic 3, angular 5

混江龙づ霸主 提交于 2019-12-25 01:34:53
问题 After I installed ngx-translate module into the ionic app and implemented translations all over the custom pages I can't build my app anymore. When I run $ ionic cordova build browser --prod I get the following exception: Running app-scripts build: --prod --platform browser --target cordova [15:30:02] build prod started ... [15:30:02] clean started ... [15:30:02] clean finished in 3 ms [15:30:02] copy started ... [15:30:03] deeplinks started ... [15:30:03] deeplinks finished in 207 ms [15:30

Apache + Angular Oauth redirection : Resource not found

百般思念 提交于 2019-12-25 00:25:35
问题 Morning; I am trying to deploy my angular project under apache and I encountered some problems with redirection in Angular. The user try to authenticate in my App using Oauth2. So it will be redirect to another domain to make authentication and then the other domain redirect the user to my application with an access token. The problem when making redirection, it shows up “resource not found”, so I tried to find a solution and I found those two solution: I insert the “{usehash : true}” in

Angular 5 issue with a named outlet children component

送分小仙女□ 提交于 2019-12-24 23:52:04
问题 I am quite new in Angular 5 and I am trying to do my first routing. Here the situation. I have the app.component as root component and others three different component that I would like to "drive" by angular routing system, here the html code: <div class="container-fluid"> <router-outlet></router-outlet> </div> <div id="main-content" class="container-fluid"> <router-outlet name="mainContentOutlet"></router-outlet> <!--<app-xsoccer-content></app-xsoccer-content>--> </div> <div id="divider"

hide Navbar before login page in angular5

蓝咒 提交于 2019-12-24 23:48:13
问题 i'm working in angular5 app , so i've used an angular5 template in github , and i tried to do the same as this tutorial to hide the navigation bar before authentication https://loiane.com/2017/08/angular-hide-navbar-login-page/ I don't get any errors but the nav bar is always hidden even after the authentication of Users .. , i'm working with backend spring boot (spring security + JWT ) this is how the project structure looks like : The file app-sidebar-component.html : in this file i get a

Angular Material 2 matHorizontalStepper form validation

此生再无相见时 提交于 2019-12-24 23:07:40
问题 I am using matHorizontalStepper from Angular Material 5.2.4 with Angular 4/5. Linear mode is on. On step 1 I have a form with two inputs which are required. But stepper checks if only one required input is filled. It's enough for stepper that user filled only one required field and let the user go for the step 2. Here's what I'm talking about https://angular-ugvs4m.stackblitz.io What can I set stepper to validate if all required inputs are filled ? 回答1: I forked your stackblitz app and fixed

Getting browsermodule already loaded despite not importing it in lazy loaded modules

前提是你 提交于 2019-12-24 21:39:11
问题 I am getting the following error despite having taken steps to remove. Can someone tell me what am I missing here ? Error: ERROR Error: Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead. The following are my modules: App Module: import { BrowserModule } from '@angular/platform-browser'; import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '

Angular5 HttpClient send data but server can not understand its params

感情迁移 提交于 2019-12-24 21:25:32
问题 When I submit a regular HTML form, My back-end service ( written in Laravel ) can understand POST parameters. I checked the request header in the browser. Request parameters are: Form Data: _token:v4xCN9fHMpZhoQMGHfbqI01XDsQ1nCxYhy3RDrw5 username:root password:123456 Then I wrote the following method to send a post request to the server via angular5 HttpClient : public post(url: string, data: any): Observable<any[]> { const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form

display first tab as default when page loads

自古美人都是妖i 提交于 2019-12-24 20:35:01
问题 log.component.html: <clr-tabs> <clr-tab> <button style="margin-left: 3% !important;" clrTabLink [routerLink]="'log1'">Log1</button> <ng-template [(clrIfActive)]="log1"> <clr-tab-content> <div class="main-container"> <div class="content-container"> <div class="content-area"> <router-outlet></router-outlet> </div> </div> </div> </clr-tab-content> </ng-template> </clr-tab> <clr-tab> <button style="margin-left: 3% !important;" clrTabLink [routerLink]="'log2'">Log2</button> <ng-template [

Typescript: getting an undefined value

独自空忆成欢 提交于 2019-12-24 19:33:07
问题 I seem to have a problem I can't solve. I want 'dialogTitle' variable to also display the startHour and startMinute variables alongside the title variable. However, I seem to get the title and 'undefined' twice after the title. What should I do? event-form.component.ts import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { MatColors }