Skip to content

Instantly share code, notes, and snippets.

@larryparitosh
Created May 31, 2017 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryparitosh/4aadf43bca3e481da1e9176d8da10fdf to your computer and use it in GitHub Desktop.
Save larryparitosh/4aadf43bca3e481da1e9176d8da10fdf to your computer and use it in GitHub Desktop.
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'
}
}
render() {
// this will render as HTML
return <h1>{this.state.title}</h1>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment