Skip to main content

Posts

Showing posts with the label Angular

Typescript

Typescript  DECLARE METHODS class Greeting { greet (): void { console . log ( "Hello World!!!" ) } } var obj = new Greeting (); obj . greet (); DATA TYPES var name : string = "John" ; var score1 : number = 50 ; var score2 : number = 42.50 var sum = score1 + score2 console . log ( "name" + name ) console . log ( "first score: " + score1 ) console . log ( "second score: " + score2 ) console . log ( "sum of the scores: " + sum ) References https://www.youtube.com/watch?v=Gd76yF1Dkg4&list=PLzvRQMJ9HDiQyjtcrtvDkeQMJIrv5ABbm&index=1 karma.js jasmine.js , Rxjs Protactor.js Types of testing UNIT INTEGRATED END TO END

Angular

@Component ({ selector : 'my-app' , template : ' < h1 > Ultra Racing </ h1 > ' })   @Component :  Used to apply our component decorator to our class. Decorators are a TypeScript feature. selector : The CSS selector for the HTML element where we want the component to load. The content we want to load inside our selector.  template BrowserModule : Module needed for running Angular websites. platformBrowserDynamic : Angular library that will render the website. USING INTERPOLATION TO PRINT PROPERTIES @Component({  selector: 'my-app'  template:' {{title}} ' //interploation  }) import { NgModule,Component } from '@angular/core' import { BrowserModule } from '@angular/platform-broswer' import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; ngOnInit () { this . carParts = CARPARTS ; }...