This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form | |
| #signupForm="ngForm" | |
| (ngSubmit)="registerUser(signupForm)"> | |
| <label> | |
| Username: | |
| <input type="text" name="username" ngModel /> | |
| </label> | |
| <label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NgModule } '@angular/core'; | |
| import { FormsModule } from '@angular/forms'; | |
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { AppComponent } from './app.component' | |
| @NgModule({ | |
| imports: [ | |
| BrowserModule, | |
| FormsModule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "name" : "", | |
| "name_ta" : "Dinakaran", | |
| "links" : [ | |
| { | |
| "name" : "Just Now - Hot News", | |
| "link" : "http://www.dinakaran.com/rss_Latest.asp" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Component, OnInit} from "@angular/core"; | |
| import {Title} from "../title"; | |
| import {Connected} from "../connected"; | |
| import {Customer} from "../customer"; | |
| import {AppServiceService} from "../../_services/app-service.service"; | |
| import {AlertService} from "../../_services/alert.service"; | |
| import {Router, ActivatedRoute} from "@angular/router"; | |
| @Component({ | |
| selector: 'app-customer-create', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type = ['','info','success','warning','danger']; | |
| function notifyMe(from, align){ | |
| color = Math.floor((Math.random() * 4) + 1); | |
| $.notify({ | |
| icon: "notifications", | |
| message: "Welcome to <b>Material Dashboard</b> - a beautiful freebie for every web developer." | |
| },{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Base Class : ES6 | |
| class Bird { | |
| constructor(weight, height) { | |
| this.weight = weight; | |
| this.height = height; | |
| } | |
| walk() { | |
| console.log('walk!'); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| incremetedItems = items.map(function(x){ | |
| return x+1; | |
| }); | |
| /* This is convert as a simple function as follow */ | |
| incremetedItems = items.map((x) => x+1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| items.forEach(function(x){ | |
| console.log(x); | |
| incrementedItems.push(x+1); | |
| }); | |
| /* After Applied Arrow Functions */ | |
| items.forEach((x) => { | |
| console.log(x); | |
| incrementedItems.push(x+1); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ServerRequest{ | |
| notify(){ | |
| // Implementation of notify() | |
| } | |
| fetch(){ | |
| getFromSerer(function callback(err,data){ | |
| this.notify(); // This is not going to work as expected. | |
| // It is producing undefined object error on console if you log the object | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Toppings{ | |
| formatToppings{ | |
| /* Implemetation of Toppings */ | |
| } | |
| list(){ | |
| return this.formatToppings(this.toppings); | |
| } | |
| } |