Issue I am using the npm package ng-dynamic-component to create dynamic components. I am in a situation where i want to call a specific function on the dynamically created component using this package. I have experimented with a lot of
Continue readingTag: typescript
Angular – using how to call function on component created dynamically using ng-dynamic-component
Issue I am using the npm package ng-dynamic-component to create dynamic components. I am in a situation where i want to call a specific function on the dynamically created component using this package. I have experimented with a lot of
Continue readingAngular 6 communicate between 2 components instances through service
Issue I have a component that loads/remove another component dynamically by calling a service. I also give the dynamically add component the ability to remove itself. My problem is notifying the other component that this instance of the dynamic component
Continue readingCreating dynamic nested components from json response
Issue I’m trying to created nested dynamic components based on json response. public content={type:’paragraph’,depth:1,text:’Root’,entityRanges:[{type:’LINK’,offset:83,length:16,data:{target:’_self’,url:’/index.htm’}}],embbeded:[{type:’text’,text:’This is Text component’}]} So in the above structure, it as type paragraph so the ParagraphComponent need to render first. It as an array object embbeded, in
Continue readingBest Way To Add Angular Component At RunTime On Click Event
Issue The website I am building has multiple components. On the “Home” page component, when a user clicks a button to add something to the page, I want to append the component of their choice to the “home” component. I
Continue readingLoad dynamic component multiple times with different data
Issue I need to load a dynamic component multiple times and pass data dynamically based on some value so that it will load with runTime data. I have tried below example https://dzone.com/articles/how-to-dynamically-create-a-component-in-angular as per example we have one messageComponent that
Continue readingCreate dynamic component (ComponentFactoryResolver) with dynamic template
Issue I want to dynamically create a component with a dynamic template, so that interpolations of this template will resolve in the context of the dynamic component. I know that I can use this code to create a dynamic component
Continue readingCreate dynamic component (ComponentFactoryResolver) with dynamic template
Issue I want to dynamically create a component with a dynamic template, so that interpolations of this template will resolve in the context of the dynamic component. I know that I can use this code to create a dynamic component
Continue readingCreate dynamic component (ComponentFactoryResolver) with dynamic template
Issue I want to dynamically create a component with a dynamic template, so that interpolations of this template will resolve in the context of the dynamic component. I know that I can use this code to create a dynamic component
Continue readingDynamic Component Loading – get component as variable
Issue I’m implementing a relatively complex component loader in Angular, and I’d like to dynamically get the component instance from a rxjs store. loadEditAreaComponent(component: any, componentInstanceData?: {}){ const componentFactory = this.cfr.resolveComponentFactory(component); const viewContainerRef = this.editAreaHost.viewContainerRef; const componentRef = viewContainerRef.createComponent(componentFactory); Object.keys(componentInstanceData).forEach(key
Continue readingCreating nested dynamic components in angular
Issue I Want to know how to create nested dynamic components and maintains its parent child relationship. For example, I have data like this, – A –A.1 –A.2 -B –B.1 -C I wanted to create the component like this, <A>
Continue readingDynamically loaded content in Angular Material Tabs
Issue I’m trying to build a dynamic tab-system from Angular Material: Tabs and I’m running into an issue with the loading of content on subsequent tabs, where the concept only works on the first tab being loaded. Below is the
Continue readingDynamically loaded content in Angular Material Tabs
Issue I’m trying to build a dynamic tab-system from Angular Material: Tabs and I’m running into an issue with the loading of content on subsequent tabs, where the concept only works on the first tab being loaded. Below is the
Continue readingDynamically loaded content in Angular Material Tabs
Issue I’m trying to build a dynamic tab-system from Angular Material: Tabs and I’m running into an issue with the loading of content on subsequent tabs, where the concept only works on the first tab being loaded. Below is the
Continue readingAngular – A function defined in one component, that generates dynamic child components can’t be called in a separate non related component
Issue Update to this in this new question. I have followed this guide which I found by finding this question but then being pointed to this question as a fix for some of the issues that occurred in the prior
Continue readingTypescript error on creating dynamic components and module
Issue Im trying to add the component and module dynamically as shown below Component: protected createNewComponent (tmpl:string) { @Component({ selector: ‘dynamic-component’, template: tmpl, providers: [{provide: CustomDynamicComponent, useExisting CustomDynamicComponent}] }) class CustomDynamicComponent implements IHaveDynamicData { @Input() public entity: any; }; //
Continue readingUnable to get the Chrome debugger to work via launch in Visual Studio Code for an Angular 8 project
Issue Upon upgrading Angular to version 8, I am now unable to run the Chrome debugger within Visual Studio Code. I have not changed my launch.json which is similar to the following: { “type”: “chrome”, “request”: “launch”, “name”: “Launch Chrome
Continue readingAngular 11 – Modal Method checks for value in array and returns false even when the constructor loads the array
Issue I have a form that registers a new Group of courses called ‘areas’. The form have a button that calls a modal window and allows the user to select the desired courses and add them to the form list.
Continue readingHow to get api data in router outlet – Angular
Issue My problem is i cannot pass parent data ngOnInit route params to my child component user-seminar. So i tried google searching and arrive a solution through services. I have changed my app navigation to router-outlet and i have main
Continue readingAngular 11: Cannot read properties of undefined (reading '0')
Issue I have an edit form that displays userSeminar data now i’ve added saveSeminar() which i want to save my changes but it gives me error even though data in html is correctly being displayed. When i press save it
Continue readingfetching data from Service and storing in Child component – Angular 11
Issue Here’s where i use my service to get api data to child. Initially it gets the Id and other user data in console. ngOnInit(): void { this.commonService.userSetChange.subscribe( apiData => { this.getUserSeminar(apiData); this.user = apiData; console.log(this.user) }); } Then i
Continue readingLogic not evaluating correct – Angular11
Issue I got method to setRemark to display message passed or failed based on grade Elementary grade = 75 is passed College grade = 3 is passed private getFinalGrade(studentId: number, gradingSections: IGradingSection[], transmutation: ITransmutation) { let finalGrade: number = 0;
Continue readingAngular custom validator with http don't work
Issue I try to make a custom validator who verify that a serial number exist in my database. To do this, the custom validator must call an api endpoint. This is my custom validator import { Injectable } from ‘@angular/core’;
Continue readingCustom Validator Not Working in Angular Reactive Form
Issue I am trying to create a custom validator that checks if a phone number already exists. My code is as follows: Validation Function phoneValidator() { return (control: AbstractControl): Observable<ValidationErrors | null> => { if (!control.valueChanges || control.pristine) { return
Continue readingCustom Validator on Angular logic gets implemented successfully but does not show the error message on my web page UI /HTML
Issue so I was doing a custom validator on my Angular form which works in the following way: excerpt from my component.ts file: creteRoute(): FormGroup { return this.fb.group({ ‘departure_airport_id’: [”, Validators.required], ‘departure_airport_code’: [”, Validators.required], ‘route_freequency’: [”, [Validators.required, Validators.pattern("^[0-9]*$")]], ‘arrival_airport_id’: [”,
Continue readingJest and Serialize-ts Count find type for field:
Issue I am facing an issue while running testing using jest in my angular application after upgrading jest to v9 while using serilize-ts The error is: Count find type for field: amount 4 | export class Price { 5 |
Continue readingCreating angular pipe using enum values
Issue I want to create a pipe using enum values to show me text colors depending on the status. this is my enum class : export enum Status { Active = ‘Active’, None = ‘None’, Processing = ‘Processing’, Expiring =’Expiring’
Continue readingAngular material table with expanded rows to be sticky, once it has been scrolled past to remove that sticky row
Issue I am using angular material table v11.1.0 having a main row with expand rows on it, that main row would be sticky once you expanded the row and as well as when you scroll the table. I would like
Continue readingAngular material table with expanded rows to be sticky, once it has been scrolled past to remove that sticky row
Issue I am using angular material table v11.1.0 having a main row with expand rows on it, that main row would be sticky once you expanded the row and as well as when you scroll the table. I would like
Continue readingClicking on next or previous month in Angular Material Calendar (mat-calendar) closes the calendar window
Issue I’m using Angular Material calendar (mat-calendar) within a mat-menu. Clicking on the calendar icon and selecting a date works fine. However when I want to go to the next month (or previous one) the whole calendar window closes. When
Continue readingWhy does assigning [dateClass] in mat-calendar have no effect?
Issue I would like to add some custom stylings for certain days shown in the mat-calendar component from angular material. After a little bit of research I came across the dateClass property which seems to be suited for this task.
Continue readingAngular 5 ng-content issue
Issue I have weird issue when I implement ng-content between two component in Angular 5. This my first component is FooterComponent <div class=”footer”> <ng-content select=”footer”></ng-content> </div> And footer.component.ts import { Component, OnInit } from ‘@angular/core’; @Component({ selector: ‘app-footer’, templateUrl: ‘./footer.component.html’,
Continue readingAccess element replaced with ng-content
Issue I’ve tried to create some tabs component that some how can be used like Angular Material Component. But the solution I’ve made is not right and is buggy I’ve used document.getElementsByTagName(‘app-tab’) This is tabs component template This is the
Continue readingngx-select-dropdown set displayKey with multiple values
Issue I am using ngx-select-dropdown with search feature and I want to set multiple displayKey values like: firstname and lastname. Below is my config object: dropdownconfig = { displayKey: ‘firstName, lastName’, search: true, placeholder: ‘Select User’, height: ‘150px’ }; html:
Continue readingRemove unselected value from dropdown array – ngx-select-dropdown
Issue context: Angular applications using the ngx-select-dropdown. A user can select multiple values, these values get sorted into "buckets" and sent to the api. Issue: I am unable to remove a selected item from the end array – this.filterState. I
Continue readingHow can I disable error logging in Promise reject?
Issue I am working with HttpClient and promises. I used httpclient.get to receive data from backend, which works all fine, but I have problem wit the errors I get. In fact I need the errors for later elaboration so I
Continue readingCalendar on Angular 2 typescript using PrimeNG
Issue So I started to use the PrimeNG and I was following the website documentation where it says everything that one should do in order to make it work. I followed everything to the point on the website, but my
Continue readingDetect [(ngmodel) change to selected date with PrimeNG calendar
Issue I have an input element with an attached datepicker created using PrimeNG calendar. HTML Part <p-calendar showAnim=”slideDown” id=”calendar” [showIcon]=”true [(ngModel)]=”myDate” (blur)=”onBlurMethod($event)”> </p-calendar> Here I have used PrimeNG calendar tag. I have used one hidden text box so I can
Continue readingPrimeNG p-calendar – disableDate format
Issue I want to disable the dates from primeNG calendar. <p-calendar [(ngModel)]=”dateValue” dateFormat=”dd.mm.yy” [disabledDates]=”[here are the dates]”></p-calendar> For example I want to disable the dates from calendar except today and tomorrow. Solution Instead of using disabledDates, you should use minDate
Continue readingProgrammatically open PrimeNG calendar in modal popup
Issue How to make PrimeNG calendar at open state by default in modal popup ? Or how to trigger click event to open PrimeNG calendar which is in modal popup by typescript ? If I used in HTML itself, it
Continue readingPrimeNG calendar form group validation issue
Issue I’m trying to add validation to my form. discount field cannot be empty and value range needs to be within 0 to 100, time_from and time_to cannot be empty. I cannot fire validation proccess on time_from and time_to. I
Continue readingPrimeNG calendar is not working as expected in Angular5
Issue I am using PrimeNG calendar for date of birth field. I am using yearNavigator and yearRange. The user can select max value is 12 years back before the current year. <p-calendar formControlName=”dob” class=”” id=”dob-registration” dateFormat=”dd/mm/yy” placeholder=”DD/MM/YYYY” readonlyInput=”true” [monthNavigator]=”true” [yearNavigator]=”true”
Continue readingEvent onValueChange on a date. PrimeNG 5.2.4
Issue I am trying to use the event onValueChange, according to the PrimeNG documentation, but it does not work. View <p-calendar (onValueChange)=”changeFechaFinEstimada()” [(ngModel)]=”empleado.fechaFinEstimada” [locale]=”es” dateFormat=”dd-mm-yy” [showIcon]=”true” name=”fechaFinEstimada” id=”field_caducidad” [monthNavigator]=”true” [yearNavigator]=”true” yearRange=”2018:2030″></p-calendar> Controller changeFechaFinEstimada() { console.log(empleado); } Solution onValueChange event is
Continue readingPrimeNG p-Calendar & AutoComplete Values and Validation
Issue I am using primeNG p-Calendar Control and AutoComplete. Here is my Code (blunker) (click on edit then save”) I have two issues: I can’t get the newly selected Date for whatever reason..no matter what I do I always get
Continue readingDefault date in prime-ng calendar
Issue Hi I am trying to use primeng calendar with datatype as string as follows: <p-calendar [styleClass]=”pCalendar” [dataType]=”‘string'” formControlName=”doC” [inputStyleClass]=”priorityDiv” [placeholder]=”‘MM/DD/YYYY'” [showIcon]=”false” [yearNavigator]=”true” [yearRange]=”‘2000:2020′” [monthNavigator]=”true” [(ngModel)]=”doC” [inline]=”false” showTime=”true” hourFormat=”12″ showButtonBar=”true” [minDate]=”minDateValue” (onSelect)=”onDateandTimeSelect($event)” (onInput)=”onDateandTimeSelect($event)”> </p-calendar> I need to set the current
Continue readingConverting ISO-8601 string to local date in typescript/javascript
Issue I am developing in Angular 6. I keep form values as json in a database when new record is saved.If end user wants to show exists record , I fill form components from json data.But I got into trouble
Continue readingHow to make asyn false like ajax in angular 7
Issue In my project, i have a full calendar with loading events dynamically from database. When i try to add events into the calendar.But it did not works for me because of httpget method synchronize problem i think. I cannot
Continue readingHow to set default date of prime-ng calendar when it is selected
Issue I’m using the prime-ng calendar and I can’t figure out how to set the default date when it is opened. The problem is that I know how to set a default value for the form field when the page
Continue readingPrimeNG: Why clicking on a FullCalendar date the dateclick event is not emitted? How can I handle the click on a specific date on my calendar?
Issue I am pretty new in Angular and moreover in PrimeNG and I am finding the following difficulties trying to use FullCalendar component, this one: https://primefaces.org/primeng/showcase/#/fullcalendar The problem is that I want to handle an event when the user click
Continue readingPrimeNG – set value in time-picker component
Issue I used calendar component from PrimeNG, I used timeOnly property to display only the time, I have a string like 12:10. I want to set this string into the calendar, is it necessary to convert it to date or
Continue readingHow do I conditionally validate input fields in my reactive form?
Issue I have a form where a user can register thesmselves or a guest. If a user is registering themselves, I don’t need to validate guest info input fields, and I do need to do it if a guest is
Continue readingHow to apply CSS classes to another component in AngularDart?
Issue Let’s say there is a simple framework to display popups: @Component( selector: ‘popup-host’, template: ”’ <div class=”popup-container”> <ng-template #popupRef></ng-template> </div> ”’, styles: [‘.popup-container { position: absolute; top: 100; left: 100; z-index: 100; }’], ) class PopupContainerComponent { final PopupController
Continue readingMasonry Gallery
Issue I am working with angular and want to create a gallery of masonry images. I tried to implement the gallery, however the images do not appear to me. Does anyone know why they appear and how to solve this
Continue readingLong Polling in Angular 4
Issue I need to do API calls to display the progress of something. I have created a service which does this every 1.5 seconds Main Component private getProgress() { this.progressService.getExportProgress(this.type, this.details.RequestID); } Services.ts public getExportProgress(type: string, requestId: string) { Observable.interval(1500)
Continue readingCall REST repeatedly in Angular (5)
Issue I need create service which will be consume data from long-polling rest service in my backend. When I call this service, backend wait until it has data to send or timeout is expired and send just empty object. In
Continue readingCall REST repeatedly in Angular (5)
Issue I need create service which will be consume data from long-polling rest service in my backend. When I call this service, backend wait until it has data to send or timeout is expired and send just empty object. In
Continue readingHow to create data for Flat Array for Angular Tree using Javascript/Typescript
Issue I have the following JSON data -> { "data": [ { "documentId": "new_148_45646", "data": "new_data6" }, { "documentId": "new_145_456", "data": "new_data1" }, { "documentId": "new_148_4546", "data": "new_data2" }, { "documentId": "new_145_456", "data": "new_data3" }, { "documentId": "new_148_4546", "data": "new_data6"
Continue readingException in delivering result of invoking 'login': signup
Issue My app is using Meteor + Angular2 (This app is based on Urigo’s tutorial) (package.json at the end) I am trying to redirect a user after he signed up. But i have this error : Exception in delivering result
Continue readingAngular 2 Meteor – TypeScript 'Cannot compile module unless the –module flag is provided
Issue I am following this Angular 2.0 Meteor Tutorial. I followed all the steps extactly, adding and removing specified modules. Installed the last versions of Meteor and of VS Code. The tutorial claims that System.js is available ‘out of the
Continue readingMeteor/Angular2 Application freeze when loading 2nd Component
Issue I got a Problem with my Meteor/Angular2 application. I got a start Component (AppComponent) and I can load this just fine everything works as I want. But now I added the tag ‘map’ to my AppComponent template and created
Continue readingMeteor/Angular2 Application freeze when loading 2nd Component
Issue I got a Problem with my Meteor/Angular2 application. I got a start Component (AppComponent) and I can load this just fine everything works as I want. But now I added the tag ‘map’ to my AppComponent template and created
Continue readingusing matb33:collection-hooks in typescript
Issue I am creating an Angular2-Meteor app, starting with the Socially tutorial. I am trying to implement user Roles using alanning:roles and matb33:collection-hooks. The solution would be similar to that proposed here. The only difference would be that Angular 2
Continue readingHow do I create a dynamic back button using Next.js
Issue I know how to create a regular back button. But I want to create a button that takes you back one step in the URL and not to the previous page. In that way I can use the button
Continue readingFirebase default hosting domains: only .firebaseapp.com works but .web.app fails
Issue I’m building a very simple one-page react application using typescript. I tried hosting it using Firebase Hosting. Surprisingly, only the domain [name].firebaseapp.com works but [name].web.app shows the "Site not found" default page: site-not-found image I am using a basic
Continue readingI can't deploying my app with next js and firestore
Issue When trying to deploy my application with npm run build or in vercel or another service it doesn’t allow me, but in localhost it works fine and doesn’t show errors I use firebase, next js and typescript, the error
Continue readingHow do I eliminate union with undefined in partial index type?
Issue I have an objectMap() function which takes an object, applies a function to each value, and returns an object with the same keys but different values. I’ve written the following declaration for it: declare function objectMap<TInputObject, TOutputValue>( target: TInputObject,
Continue readingMap incoming JSON Object to typescript interface
Issue Is there a way to map incoming JSON object to typescript interface? So, let me explain. I have tried using class-transformer, but it does not solve my problem. In javascript, I would have used object-mapper to transform from source
Continue readingTypeScript: Modifying copy of list of dictionary without mutation
Issue I have gone through several of the answers and I gather that this might be a logical error but I am not able to figure a way to achieve this. I have to list of dictionaries in typescript/javascript. One
Continue readingWhat is the best place to put a JavaScript listening function in Angular component?
Issue TL;DR: I am rendering a BioDigital HumanAPI anatomical model in my Angular 5 app within an iFrame. I instantiate API object using: this.human = new HumanAPI(iFrameSrc); There’s an API function human.on(…) that can be used to register click events
Continue readingTypescript – null array reference
Issue I’m writting application in typescript/angular and i have a service which get json with data and i’d like to display this downoad objects, but it can occur that objects can be more than i can display in one html
Continue readingDynamic creation class field on ngOnInit() in Angular
Issue I try to dynamic create variables in class to store values and use it in ngModel and other placese. I know, that I can assign value to variables in ngOnInit() like this export class Component implements OnInit{ name: string;
Continue readingCannot read property of undefined error even though the binding is working
Issue So, I have a dropdown in my web app that I hooked up to my service api call that will populate the dropdown with list of locations. I created the service and set up the Observable using httpclient. Then
Continue readingAngular 2 ngOnInit not called
Issue I am building an Angular 2 app with version beta.8. In this app i have a component which implements OnInit. In this component i have the function ngOnInit, but the ngOnInit function is never called. import { Component, OnInit
Continue readingDelete empty row created by subscription to service on ngOnInit()
Issue I have a Material Data table, which the user can fill and empty by himself. The data, which gets into the table gets triggered by a service, which I initialized in the table component with ngOnInit(). Code: ngOnInit() {
Continue readingDelete empty row created by subscription to service on ngOnInit()
Issue I have a Material Data table, which the user can fill and empty by himself. The data, which gets into the table gets triggered by a service, which I initialized in the table component with ngOnInit(). Code: ngOnInit() {
Continue readingTypescript – Angular testing, how to handle http request with parameters that is inside of ngOnInit?
Issue I have a modal component that gets inputs from outside and, when opened, does send a request to server to get data. After getting data it gets assigned to a public variable and used for showing data. How do
Continue readingAngular Redirection executes my method as well as NgOnInit. Why?
Issue I am new with angular so bear with me. I am having issue with Angular Redirection.When I clear storage manually, code executes ngOnInit, prompts error,redirects to Login page (as expected), but when I try to do same thing using
Continue readingHow to loop through an Array in a subscribe and ngOnInit method?
Issue I have a question i want to loop through an .subscribe() method which is in an ngOnInit() method: ngOnInit() { this.service.getEmployees().subscribe( (listBooks) => { this.books = listBooks var events: CalendarEvent[] = [ { start: new Date(this.books[0].date_from_og), //loop instead of
Continue readingundefined value return on ongonit for function parameter
Issue have two functions which , first function returns the result which stored in a variable, the same returned result variable passed as parameter in second function to hit the service. as explained code below , the two functions are
Continue reading@Viewchild not initializing during ngOnInit
Issue I’m running two MatTables in different components with data sources from different observables. One of my tables sort functionality is working fine and but on my second table it seems as if the @ViewChild for MatSort doesn’t initialize during
Continue readingWhat is the difference between Angular ngOnInit() and ngOnChanges()?
Issue Angular provides lifecycle hook ngOnInit() and ngOnChanges() by default. Why should ngOnInit be used, if we already have a ngOnChanges? And constructor also. Solution How a form need be setup 0. Static design Html markup should hold how the
Continue readingAngular Material tab navigates to selected tab after ngOnInit
Issue I want to to navigate to new tabs and show loading spinner until search component gets data from api to display. But tab navigates to selected item only after component has been loaded. Is there any way to change
Continue readingI can't figure out why Angular component class add implements onInit interface
Issue When you create a component through the “ng g component ~” command, the component class automatically implements ‘OnInit’ interface. The following snippet shows how a component can implement this interface to define its own initialization method. @Component({selector: ‘my-cmp’, template:
Continue readingHow to assign value to interface property from http/async call in Angular?
Issue I have a service that returns a JSON object and I want to assign this data to an interface property. Here is the following code, the component.ts code here has been stripped down to contain only the relevant parts.
Continue readingthis.results.rulesFired not getting defined
Issue I have the following table rows <tr *ngFor="let firedRule of splitRules(results.rulesFired); let rowNumber = index" [class.added]="isAdd(firedRule)" [class.removed]="isRemove(firedRule)" [class.modified]="isModify(firedRule)"> Here is the splitRules function, which basically takes in a list of rules and break down each rule into new properties:
Continue readingProblem with calling multiple asynchronous functions in ngOnInit
Issue Good afternoon, I am struggling with placing functions in ngOnInit. If I understand what is going wrong correctly, the problem appears to be that when I place asynchronous functions in ngOnInit and the next function depends on the complete
Continue readingAccess local var from ngOnInit from another function
Issue I am new to Angular and TS. I am trying to access a local var that is in ngOnInit from outside it, but I don’t know how to do it properly. I have a component called BlocklyComponent where I
Continue readingList of checkboxs keep initial state after changing page
Issue Am using angular 9 and i have a list of checkboxes that need to be set true by default to list of some data. Upon unchecked of one those checkboxes it should display certain data. The problem i encountered
Continue readingAngular 7 unit testing dependency injection not working in ngOnInit
Issue I am using Angular 7 with and Angular CLI version 7.3.4. I am unit testing a component with 2 service injections all important code is included below. I included the stub which is causing errors, the spec file, and
Continue readingHow to use showLoadingOverlay in ag grid during ngoninit
Issue I am using ag grid to display table in one of my application. I could not able to see the loading message when data is getting loaded during the application initialization. Below is my code, ngOnInit() { this.gridOptions =
Continue readingAngular ngOnInit the object property is always undefined despite the the object has value
Issue I have an angular project and currently I am trying to set a reactive form values on ngOnInit method. I get the data with http call from a backend server. In the ngOnInit method I can monitor data on
Continue readingWhy is angular saying my object can be null when creating in ngOnInit?
Issue Creating a form in the component: export class LoginPageComponent implements OnInit { form!: FormGroup constructor() { } ngOnInit() { this.form = new FormGroup({ email: new FormControl(null, [Validators.required, Validators.email]), password: new FormControl(null, [Validators.required, Validators.minLength(6)]), }) } } In html, I
Continue readingHow to add json data to mat options values in angular 14
Issue Trying to change the mat options checkbox value by json data to but not able to change.I have three buttons, Each button have josn data file.If i click the New Data 1 button i want to set the that
Continue readingHow to set limitation for mat checkbox in angular 14
Issue Trying to set limitation for checkbox but not working. If i select more then 2 check box i want to not allow to select. I have tried but not working properly. If anyone knows please help to find the
Continue readingHow to iterate two elements in a row with ngFor?
Issue I have array of strings and I want to place every two of them in a row with ngFor. Here is what I tried: <div class=’row wow fadeInUp’ *ngFor=’let index of myArray;let i = index;’> <div class=’col-md-6′> <md-card> <md-card-header>
Continue readingCan't bind to 'formControl' since it isn't a known property of 'input' – Angular2 Material Autocomplete issue
Issue I am trying to use Angular Material Autocomplete component in my Angular 2 project. I added the following to my template. <md-input-container> <input mdInput placeholder=”Category” [mdAutocomplete]=”auto” [formControl]=”stateCtrl”> </md-input-container> <md-autocomplete #auto=”mdAutocomplete”> <md-option *ngFor=”let state of filteredStates | async” [value]=”state”> {{
Continue readingCan't bind to 'formControl' since it isn't a known property of 'input' – Angular2 Material Autocomplete issue
Issue I am trying to use Angular Material Autocomplete component in my Angular 2 project. I added the following to my template. <md-input-container> <input mdInput placeholder=”Category” [mdAutocomplete]=”auto” [formControl]=”stateCtrl”> </md-input-container> <md-autocomplete #auto=”mdAutocomplete”> <md-option *ngFor=”let state of filteredStates | async” [value]=”state”> {{
Continue readinghow to define index in angular material table
Issue how should I define an index variable when angular material table is used as ngFor is not used in this table. I did search for it in the documentation but index is not mentioned any where in it. <mat-table
Continue readingPrevent IE11 caching GET call in Angular 2
Issue I have a rest endpoint that returns a list on a GET call. I also have a POST endpoint to add new items and a DELETE to remove them. This works in Firefox and Chrome, and the POST and
Continue readingNativeScript – TimePicker Cannot get user modified value
Issue I am unable to get the user modified value of a TimePicker. All I’m getting is the original value that I set in the control. Here is my component template: <TabView [(ngModel)]=”tabSelectedIndex” selectedColor=”#FF0000″ style=”height:90%”> <StackLayout *tabItem=”{title: ‘Time’}”> <TimePicker #timePicker
Continue reading