angular7

How can I migrate a web app with Angular v7 to mobile NativeScript app

空扰寡人 提交于 2019-12-08 06:45:44
问题 I made a simple web app with Angular v7 and I want to migrate it to a NativeScript mobile app . I followed the instructions in https://docs.nativescript.org/angular/code-sharing/migrating-a-web-project#migrating-components but I am facing a difficulty. The app is running in my Android mobile phone but it does not show the content because I need to adjust it properly for a mobile app. It shows auto-generated works. The problem is I do not know how I can do adjust properly the code since I

How to change the angular 7 functionalities for implementing rtl language support?

ぐ巨炮叔叔 提交于 2019-12-08 06:02:20
问题 I have been doing a website in angular 7 which supports both English and Arabic language. I almost completed the English designs. I am stuck at doing the RTL design . Not in html and css codes but in angular 7 functionalities. Pretty much looking for a clean logic from start. We tried to use multiple css per page. But that did not work well. Is there any other possible ways i could make use of? If there, share your ideas. Angular 2+ localization (i18n) rtl support I used this to flip the

Angular 7 doesn't find pipes

 ̄綄美尐妖づ 提交于 2019-12-08 04:55:18
问题 I'm trying to build my Angular 7 project but every time I get an error saying ERROR in : Template parse errors: The pipe 'currency' could not be found.... But when I try to run the ng serve it does works as expected I've tried to build it with the --prod flag, and it doesn't work. If I remove the production flag, it build correctly. 回答1: Try this: in tsconfig.json change "angularCompilerOptions": { "enableIvy": true } for "angularCompilerOptions": { "enableIvy": false } 回答2: In order to use

How to get Twitter to recognize Angular7 meta tags in a sub page served by a route

放肆的年华 提交于 2019-12-08 02:26:40
问题 I want my Angular7 code to take a URL that contains a route and present desired updated meta tags to Twitter so that Twitter will render the correct social card. Following standard practices for meta tags, which includes declaring in index.html header and updating in constructors of pages loaded by routes, I can see the correct updated values in the browser console, but twitter ignores those updates and uses the first meta tags from index.html. From index.html... <head> <title>My Title</title

angular 7 does not ask if to use routing when i create a new project

 ̄綄美尐妖づ 提交于 2019-12-07 10:00:55
问题 I was formerly using Angular version 6, now I have upgraded to 7. But when I try to create a new project in CLI using ng new [app-name] it just starts without asking if I want to include routing in my project or the styling. P.S: I have the latest version of Angular i.e 7.0.2. 回答1: ng new {Project-name} command by default creates project without routing. You need to set routing flag as true while creating project as below(by default this routing flag will be false), ng new {Project-name} -

Angular 7 to dotnetcore 2.1 web api call gives no response

爷,独闯天下 提交于 2019-12-07 09:01:27
问题 below is the code from login.component.ts, login() { const val = this.form.value; if (val.email && val.password) { this.authService.login(val.email, val.password) .subscribe( data => { if (data && data.Token) { // store user details and jwt token in local storage to keep user logged in //between page refreshes localStorage.setItem('currentUser', JSON.stringify(data)); console.log("user logged in"); this.router.navigate([this.returnUrl]); } else { console.log("user not logged in"); } }, error

Angular Dialog box service issue

折月煮酒 提交于 2019-12-07 06:11:23
I am extending my question here: Develop common Dialog Box Service using Angular 7 . I found that because I have custom style.css file which is overriding the openDialog width and everything and its coming to the footer part in my application. When I click on 'Yes' or 'No', then nothing happens, if I click few times then only it works. I don't see anything wrong/error coming to console and no control to debug coming etc., openDialog(title: string, message: string): void { this.title = title; const dialogRef = this.dialog.open(ConfirmationDialogComponent, { width: '350px', data: message, });

How to implement a global loader in Angular 7.1

▼魔方 西西 提交于 2019-12-06 19:19:07
问题 I have a global loader which is implemented like this: CoreModule: router.events.pipe( filter(x => x instanceof NavigationStart) ).subscribe(() => loaderService.show()); router.events.pipe( filter(x => x instanceof NavigationEnd || x instanceof NavigationCancel || x instanceof NavigationError) ).subscribe(() => loaderService.hide()); LoaderService: @Injectable({ providedIn: 'root' }) export class LoaderService { overlayRef: OverlayRef; componentFactory: ComponentFactory<LoaderComponent>;

Angular 7 - How to load material snackbar when checkbox checked in datatable

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 16:46:19
I have created datatable with checkbox. When user select checkbox, snackBar must be load (currently working good) with length of selected checkbox. But snakcbar loading everytime when user select more than one checkbox. How to load snackbar and just show length of selected ids.(without load snackbar everytime). Snackbar just need to show increment of selected ids. I push selected ids in public endorsementIds: string[] = []; . If endorsementIds length is 0, snackbar must hide. Here is my code in stackblitz . Thank you in advance :) 来源: https://stackoverflow.com/questions/55292538/angular-7-how

Develop common Dialog Box Service using Angular 7

老子叫甜甜 提交于 2019-12-06 15:17:57
问题 I am working on Angular 7 and looking to develop common component or service to show Alerts/Dialog Box when User Confirming/Deleting details on button click. I went through link: https://firstclassjs.com/create-a-reusable-confirmation-dialog-in-angular-7-using-angular-material/ and on web I found the many people are using Angular Material way to implement. Is there any simple way to dynamically pass the title and message to alert service or component based on action like Update/Delete you're