Showing posts with label angular. Show all posts
Showing posts with label angular. Show all posts

Angular Typescript Loop particular number replace

Angular Typescript Loop particular number replace


Hi,

Today Discuss Angular Typescript Superset Script How to replace Particular number looping let's start discussion follow this code. Loop every language is commonly used 

Angular Typescript Loop particular number replace
Angular Typescript Loop particular number replace


let a = 100;
let str:any =[];
let ar:any = [];
for(var i=1;i<a;i++){

if(i==4){
ar.push('buzz');
} else {
ar.push(i);
}
}
console.log(ar); ////Replaced 4 number only Buzz

Angular AutoComplete

Angular AutoComplete 


Today Discuss Angular AutoComplete Typescript Search and more data finding dropdown method or autocomplete simple way angular typeahead is default one.

npm ERR! Only HTTP(S) protocols are supported
npm ERR! Only HTTP(S) protocols are supported



npm install --save ngx-type-ahead

@NgModule({
  imports: [
    TypeaheadModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

<type-ahead formControlName="myControl" [suggestions]="mySuggestions"></type-ahead>

TypeaheadSettings



export interface TypeaheadSettings {
  /** how much should be user's typing debounced */
  typeDelay: number; // Default is `50`
  /** maximal number of visible items in dropdown. If value is 0, list will not be limited */
  suggestionsLimit: number; // Default is `10`
  /** text shown when there are no matches */
  noMatchesText: string; // Default is `No matches found`
 
  /** css classes for parts of type-ahead */
  tagClass: string; // Default is `btn badge badge-primary`
  tagRemoveIconClass: string; // Default is ``
  dropdownMenuClass: string; // Default is `dropdown-menu`
  dropdownMenuExpandedClass: string; // Default is `dropdown-menu show`
  dropdownMenuItemClass: string; // Default is `dropdown-item`
  dropdownToggleClass: string; // Default is `dropdown-toggle`
}

Angular AutoComplete

Angular AutoComplete 


Today Discuss Angular AutoComplete Typescript Search and more data finding dropdown method or autocomplete simple way angular typeahead is default one.

npm ERR! Only HTTP(S) protocols are supported
npm ERR! Only HTTP(S) protocols are supported



npm install --save ngx-type-ahead

@NgModule({
  imports: [
    TypeaheadModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

<type-ahead formControlName="myControl" [suggestions]="mySuggestions"></type-ahead>

TypeaheadSettings



export interface TypeaheadSettings {
  /** how much should be user's typing debounced */
  typeDelay: number; // Default is `50`
  /** maximal number of visible items in dropdown. If value is 0, list will not be limited */
  suggestionsLimit: number; // Default is `10`
  /** text shown when there are no matches */
  noMatchesText: string; // Default is `No matches found`
 
  /** css classes for parts of type-ahead */
  tagClass: string; // Default is `btn badge badge-primary`
  tagRemoveIconClass: string; // Default is ``
  dropdownMenuClass: string; // Default is `dropdown-menu`
  dropdownMenuExpandedClass: string; // Default is `dropdown-menu show`
  dropdownMenuItemClass: string; // Default is `dropdown-item`
  dropdownToggleClass: string; // Default is `dropdown-toggle`
}

Angular 5 Step by Step Tutorial for beginners

Angular 5 Step by Step Tutorial for beginners 


Hi guys today will started Angular 5 How to create sample project and then each line step by step tutorial for beginners this post. First Angularjs 1 and Angular 2 plus total different concept. Angularjs version 1 is angularjs this is javascript but angular 2 plus is typescript super set script Angular 5 Step by Step Tutorial for beginners 

Angular 5 Step by Step Tutorial for beginners
Angular 5 Step by Step Tutorial for beginners 
In this course, you're going to learn all about:

  1. Installing Angular 5
  2. Components 101
  3. Templating & Styling with HTML & CSS
  4. Property & Event Binding
  5. Animation
  6. Services
  7. Router
  8. Deployment

First download nodejs click here


Then Install Angular Cli globally


npm install -g @angular/cli

ng new dev2tricks

cd dev2tricks

ng serve

npm ERR! Only HTTP(S) protocols are supported

npm ERR! Only HTTP(S) protocols are supported

npm ERR! Only HTTP(S) protocols are supported Angular 5 TypeScript npm installing facing issue.

Solve this issue you make change follows step:

npm ERR! Only HTTP(S) protocols are supporte
npm ERR! Only HTTP(S) protocols are supporte

npm config set registry https://registry.npmjs.org/


npm config set registry http://registry.npmjs.org/ 

you set http only after you should run its working fine.