Skip to content

Instantly share code, notes, and snippets.

@larryparitosh
larryparitosh / react.component.jsx
Created May 31, 2017 10:13
Basic Angular Component
// Import Component from React module
import React { Component } from 'react';
// Component Class
export default Class AppComponent extends Component {
constructor() {
super();
this.state = {
title: 'Hello World'
}
@larryparitosh
larryparitosh / angular.component.ts
Created May 31, 2017 10:10
Basic angular component
// Import Component from Angular module
import { Component } from '@angular/core';
// Component decorator
@Component({
selector: 'app',
templateUrl: './app.component.html', // your html will be here
styleUrls: ['./app.component.css']
})
@larryparitosh
larryparitosh / angular.html
Created May 31, 2017 10:03
Angular loop example
<li ng-repeat="item in items">{{item}}</li>
@larryparitosh
larryparitosh / react.js
Created May 31, 2017 10:02
React loop example
return this.props.items.map( (item) => {
return <li>{item}</li>
})