Hello to all, welcome to therichpost.com. In this post, I will tell you, Angular 8 input phone number with country code.
Guy’s this post code snippet will also work in angular latest version Angular 17 input type phone number with country code and country flags.
Guys click here to see the updated version of this post for Angular 11+ versions.
Post Working:
In this post, I am showing input field with enter phone number with country code and country flags.
Here is the working coding steps and please follow carefully:
1. Here are the basics commands to install angular 17 on your system:
npm install -g @angular/cli
ng new angularpopup //Create new Angular Project
cd angularpopup // Go inside the Angular Project Folder
ng serve --open // Run and Open the Angular Project
http://localhost:4200/ // Working Angular Project Url
2. Here is the below command you need to run into your terminal to add intl tel input into your angular 8 application:
npm install ng2-tel-input intl-tel-input --save
3. Now you need to add below code into your angular.json file:
Hello to all, welcome to therichpost.com. In this post, I will tell you, how to playing with API data in Angular 7, Angular 8 and Angular 9.
Post Working:
In this post, I will show the code snippet in which I am getting data from laravel in json format and I am getting that json data in my angular 9 application with the help of HttpClient and then call that data into my angular html component.
This will be helpful in Angular 7, Angular 8 and Angular 9.
Here is the working code snippet and please use carefully:
1. Here is the code for app.component.ts file:
...
import { HttpClient} from '@angular/common/http';
...
export class AppComponent implements OnInit {
data: any;
constructor( private http: HttpClient) {
// Example API DATA Format [{"id":22,"title":"Title 1"},{"id":23,"title":"Title 2"},{"id":24,"title":"Title 3"},{"id":25,"title":"Title 4"}]
this.http.get('APIURL').subscribe(data => {
this.data = data;
}, error => console.error(error));
}
}
2. Here is the code for app.component.html file:
<ul>
<li *ngFor="let item of data; let i = index" [attr.data-index]="i">
{{item.title}}
</li>
</ul>
This is it and I think this will be helpful and if you have any query then please let me know.
<div class="date">{{item.dateadded | date:'dd'}}<br>{{item.dateadded | date:'MMM'}}</div>
// This will show the date in format what you want
5. Looping in Angular:
<ul>
<li *ngFor="let tag of tags; let i = index" [attr.data-index]="i">
<a href="#">{{tag}}</a>
</li>
</ul>
// tags data is coming from angular component and number the tags data will generate same number of li
I will share more in angular and if you have any query then please let me know.
Hello to all, welcome to therichpost.com. In this post, I will tell you, Laravel 6 change user password complete working code.
Post Working:
In this post, I am doing, login user can change his/her password and I am doing this in Laravel 6. I will share, blade, route and controller code in this post.
Here is the working code snippet and please use carefully:
Hello to all, welcome to therichpost.com. In this post, I will do Angular Laravel crud part 1.
Post Working
In this post, I will tell you Angular Laravel crud part 1. In this, I will do basic angular and laravel setup. I will use angular 8 and laravel 6. I will also do angular and laravel api integration to get and set data.
Here is the code snippet and please use carefully:
1. Here are the basics commands to install angular 8 on your system:
npm install -g @angular/cli
ng new angularpopup //Create new Angular Project
cd angularpopup // Go inside the Angular Project Folder
ng serve --open // Run and Open the Angular Project
http://localhost:4200/ // Working Angular Project Url
2. After done with above, you need to run below commands to set bootstrap environment into your angular 8 application:
Mostly I used bootstrap because of good looks to my application.
npm install --save bootstrap
3. Now you need to add below code into your angular.json file:
Here is the complete working code snippets and please follow carefully:
1. Here are the basics commands to install angular 8 on your system:
npm install -g @angular/cli
ng new angularpopup //Create new Angular Project
$ cd angularpopup // Go inside the Angular Project Folder
ng serve --open // Run and Open the Angular Project
http://localhost:4200/ // Working Angular Project Url
2. After done with above, you need to run below commands to set bootstrap environment into your angular 8 application:
Mostly I used bootstrap because of good looks to my application.
npm install --save bootstrap
3. Now you need to add below code into your angular.json file:
Hello to all, welcome to therichpost.com. In this post, I will tell you, Angular 8 Child Routing Working Example.
If you are new then you can check my old posts related to Angular 8.
Post Working
In this post, I am showing, how child routes work. I have used Bootstrap 4 for navigation. In this post, you will see, how child routing and child component data will be shown and how child and parent will connect.
Here are the working code snippets and please follow carefully:
1. Very first, you need to run common below commands to add Angular 8 project on your machine:
$ npm install -g @angular/cli
$ ng new angularselect2 //Install Angular Project
$ cd angularselect2 // Go to project folder
$ ng serve //Run Project
http://localhost:4200/ //Run On local server
2. Now you need to run below commands to add bootstrap 4 and jquery into your Angular application:
In this post, I am working with material angular datatable with custom button and when I will click on that custom button then I will get popup alert with dynamic row data.
Guy’s Angular 17 came and if you are new in Angular 12 then please check below links:
Here is the working code snippet and please follow carefully:
1. Here are the basics commands to install angular 11 on your system:
npm install -g @angular/cli
ng new angularpopup //Create new Angular Project
$ cd angularpopup // Go inside the Angular Project Folder
ng serve --open // Run and Open the Angular Project
http://localhost:4200/ // Working Angular Project Url
2. After done with above, you need to run below command to add @angular/material into your angular 8 application:
ng add @angular/material
3. Now you need to add below code into your src/app/app.module.ts file:
...
import { MatTableModule } from '@angular/material/table';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatButtonModule } from '@angular/material/button'
@NgModule({
...
imports: [
...
MatPaginatorModule,
MatTableModule,
MatButtonModule
],
4. Now you need to add below code into your src/app/app.component.ts file:
6. Now you need to add below code into src/app/app.component.css file:
table {width: 100%;}
In the end, don’t forgot to run ng serve command. If you have any query then do comment below.
Note: Friends, I just tell the basic setup and things, you can change the code according to your requirements. For better understanding please watch the above video.
I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.