Last active
November 13, 2016 08:34
-
-
Save jrwebdev/6be0248cbaf84165f4238261b7900a6c to your computer and use it in GitHub Desktop.
Angular 1 vs 2 Component Naming
This file contains 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
// Angular 1 | |
const module = angular.module('myModule', []); | |
module.component('myComponent', { | |
template: '<div>Hello World!</div>' | |
}); | |
/***************************************************************/ | |
// Angular 2 | |
import {Component} from '@angular/core'; | |
@Component({ | |
selector: 'my-component', | |
template: '<div>Hello World</div>' | |
}) | |
class MyComponent {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment