2018-10-22         Troy

How to get ion-input type date to open calendar when on desktop/core

I have an ionic3/angular application that is also used on desktop/core. I have the typical...<ion-item> <ion-label></ion-label> <ion-datetime *ngIf="!platform.is('core')"></ion-datetime> //this line works just fine <ion-input type="date" *ngIf="platform.is('core')"></ion-input></ion-item>for the user to enter a date (birthdate, enrollment date, etc.). My problem is that ion-input doesn't seem to support type 'date.' It seems to be defaulting to some sort of text input. Setting it up as above DOES allow me to manually ...

 angular                     1 answers                     92 view
 2018-10-22         Sandra

Angular Data Tables throwing error in Angular 6 Application

I am using data tables in my Angular app. After installing data tables, I am facing the below error:ReferenceError: angular is not defined at Object../node_modules/angular-datatables/dist/angular-datatables.jsCan someone tell me what should I do to proceed? You are using library for AngularJS. Use https://github.com/l-lin/angular-datatables/ insteed [XXX]

 angular                     1 answers                     36 view
 2018-10-22         Buck

Converting function from RxJS v5.x to v6

I've started with an Angular 5 template and converting it to Ang 6.https://github.com/mmacneil/AngularASPNETCore2WebApiAuthI'm aware RxJS has changed e.g. RxJS v5.x to v6.So how to I convert this code to v6 taken that the .map has been changed completely.register(email: string, password: string, firstName: string, lastName: string,location: string, gender:string, birthDate:any): Observable<UserRegistration> {let body = JSON.stringify({ email, password, firstName, lastName,location,gender,birthDate });let headers = new Headers({ 'Content-Type': 'application/json' });l...

 angular                     2 answers                     92 view
 2018-10-22         Lisa

Angular 6 description in interface properties

I want to ask if its possible to ad description attribute to property, some equivalent of dot net data descriptions, for example:interface ModuleStatus { [Description "Module state"] moduleStateSymbol: string; [Description "Module type"] moduleTypeSymbol: string;}It would give me some dynamic in html, something like:<pre>{{moduleStatus.getDescription}} - {{moduleStatus.moduleStateSymbol}}</pre>Is it possible??And if not in interface i can change it to class?? no its not possible . interface are just for type checking and doesnt exist in runtime .i...

 angular                     2 answers                     93 view
 2018-10-22         Justin

Using NgRx (with ngrx-actions library) within an Angular 6 library

I am trying to split up an Angular application with multiple modules into multiple (separate) Angular libraries (using this guide), so I can use these libraries within multiple Angular applications.Currently the project has several modules, for example:One for authentication/authorization;One containing all kind of table componentsOne containing all kind of filter componentsOne containing all kind of chart components... (I guess you get the point) ...I started working on 'converting' the authentication/authorization module into a library, because I expected it would be the ...

 angular                     1 answers                     93 view
 2018-10-22         Gilbert

How to run angular application?

I'm on ubuntu 18.0.4. I had installed angular-cli. Using ng I tried creating new app conFusion with command: ng new conFusion -dir=./conFusion --style=scss. This is terminal after my command:CREATE conFusion/README.md (1026 bytes)CREATE conFusion/angular.json (3666 bytes)CREATE conFusion/package.json (1315 bytes)CREATE conFusion/tsconfig.json (408 bytes)CREATE conFusion/tslint.json (2805 bytes)CREATE conFusion/.editorconfig (245 bytes)CREATE conFusion/.gitignore (503 bytes)CREATE conFusion/src/favicon.ico (5430 bytes)CREATE conFusion/src/index.html (296 bytes)CREATE conFusi...

 angular                     2 answers                     93 view
 2018-10-22         Hamiltion

Anchor link is not working from JSON string in ionic 3 and angular 4 : ur "<a (click)='openActionPage()'>terms and conditions</a>"

Am using this string in JSON file.In order to proceed, you need to agree with our "terms and conditions" and adding for accessing in frontend using <message *ngFor="let message of messages" [innerHTML]="message.content"> {{message.content}}</message>but the link openActionPage() is not opening in front end. Can anyone please suggest how me to solve this ? Thank you in advance so what you are trying to do here is to add dynamically some html code as innerHTML with anchor tag (a) and event binding to a method inside your ts file - this won't really work like...

 angular                     1 answers                     55 view
 2018-10-22         Brandon

Patching Items Doesn't Update Validity in Angular

I've a problem because after i submit the form, even though there's a value, the "field is required" doesn't disappear. It supposed to disappear. Is there something wrong with my validity? Please see this link See this link TSpatchValues(id, i) {let x = (<FormArray>this.addForm.controls['rows']).at(i);const selectedIngredient = this.ingredients.find(y => y.id == id);x.patchValue({ unit_price: selectedIngredient.price});} In these cases, you have to trigger a validity check with (for example) : x.patchValue({ unit_price: selectedIngredient.price});x.get('unit_...

 angular                     2 answers                     56 view
 2018-10-22         Norman

Month year picker in angular4 validation error

I am New in Angular4. I want a Month and year picker. I try this<dp-date-picker #searchFromPicker mode="month" theme="dp-material" onkeydown="return false" (onChange)="onChangeSearchFrom($event)"></dp-date-picker><button class="glyphicon glyphicon-calendar" style="padding-top:5px; padding-bottom:5px;" (click)="openSearchFrom()" [disabled]="!editable"></button>.But validation such as disable,min,max etc is not working in this example.Refer any better option if available other than this. Please help me. Try mater...

 angular                     1 answers                     56 view
 2018-10-22         Allen

How can i integrate chat feature in my Angular4 application?

I want to integrate chatting feature in Angular4 application with text message, smilies, attachment sharing, group chat etc.Chatting between the users of my application. Users list is available from my database. Want to do chat among them.Is there any open source frameworks for this?Please assist You can achieve that by Integrating Web Sockets, Node & Angular WebSockets is a protocol that provides a bi-directional communication channel. This means that a browser and web server can maintain real-time comms, sending messages back and forth while the connection is open...

 angular                     1 answers                     56 view
 2018-10-22         Freda

Parsing API Response (object) from component to another component in Angular 4

I want to parse API response to another componentThis is code from 'detail_item.component.ts', this code sent data to route "bookitem" in 'book_item.component.ts'onSubmit(){ this.appService.addItem(this.item).subscribe(item => { if(item.status ==200){ this.router.navigate(['/bookitem'], {queryParams: {data: item.data}}); } })}this is code from 'book_item.component.ts'ngOnInit() { this.routeActive.queryParams.filter(params => params.data).subscribe(params => { this.book_item = params.data; });}when I console.log(this.book_item), wh...

 angular                     2 answers                     56 view
 2018-10-22         Delia

Downloading Image in Angular 4

I am trying to download the image from UI in angular 4. So far, i've applied the following code to download the image:DownloadImageFromUrl(imageUrl) {imageUrl = this.ImagePath + imageUrl;this.Service.GetImage(imageUrl, { responseType: ResponseContentType.Blob }) .map(res => { return new Blob([res._body], { type: res.headers.get("Content-Type") }); }) .map(blob => { var urlCreator = window.URL; return this.sanitizer.bypassSecurityTrustUrl(urlCreator.createObjectURL(blob)); }) } Following the "GetImage" function:GetImage(url: string, options?: R...

 angular                     1 answers                     59 view
 2018-10-22         Mignon

Angular: Is there a way to mock the value of PLATFORM_ID in a unit test?

I am using Angular Universal. I have a guard for a route that behaves differently depending on if I am running on the server or the browser platform. Here is the guard:export class UniversalShellGuard implements CanActivate { private isBrowser: boolean; constructor(@Inject(PLATFORM_ID) private platformId: Object) { console.log('PLATFORM_ID = ' + platformId); this.isBrowser = isPlatformBrowser(this.platformId); } canActivate(): Observable<boolean> | Promise<boolean> | boolean { return !this.isBrowser; }}As you can see, the guard is injecting PLATFOR...

 angular                     1 answers                     57 view
 2018-10-22         Valentina

Syncfusion : How to install only Grid component from Syncfusion for Angular

I am working on a Web App which Uses Syncfusion grid to display tabular Data.My App is Webpack based (not CLI). I have followed Getting Started with Webpack guide from Syncfusion website and integrated into my APP. The grid is showing up as it's supposed to be. The problem is, when I compile the code , the bundle size is about 19MB and almost 13MB is occupied by Syncfusion. The help I wanted is can anybody please tell me how to install only grid component from syncfusion library? I did't found any solution which helps me to do so. Package json : { ........... "refle...

 angular                     1 answers                     32 view
 2018-10-22         Colbert

What is the best way to get current route params in Angular 6 services?

I am trying to find out what is the best way to get the current route params in Angular 6.At the moment I have to pass the ActivatedRoute to the service's method as argument and then use it in the service.export class MainComponent { constructor(private dataService: DataService, private activeRoute: ActivatedRoute) { } getChartsData() { return this.dataService(this.activeRoute); }}@Injectable({ providedIn: "root"})export class DataService { getChartsData(activatedRoute) { if (activatedRoute.snapshot.params['id']) { ... } else { ...

 angular                     2 answers                     26 view
 2018-10-22         Sabrina

Unwrapping & parsing model errors in Angular after consuming web api

I've an api for sales person, which will return model errors like this (on failure of submit): {"Message": "The request is invalid.","ModelState": { "sv.Name": [ "The field Name must be a string or array type with a minimum length of '3'." ], "sv.Designation": [ "The field Designation must be a string or array type with a minimum length of '2'." ], "sv.JoiningDate": [ "Value for JoiningDate must be between 1/1/2000 12:00:00 AM and 1/1/2019 12:00:00 AM" ], "sv.IncentivePercent": [ "The field IncentivePercent must be between 0....

 angular                     1 answers                     32 view

Page 1 of 1060  |  Show More Pages:  Top Prev Next Last