Created
October 11, 2017 18:29
-
-
Save dherges/a56e1eb342aae6fd79cd048cae2c3abb to your computer and use it in GitHub Desktop.
Angular: Componentful Functions
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
function MyComponent () { | |
this.message = 'foo'; | |
} | |
MyComponent.prototype.ngOnInit = function () { | |
this.message = 'bar'; | |
}; | |
MyComponent.prototype.sayHello = function () { | |
this.message = 'Hello World'; | |
}; | |
export const FunctionWorksComponent = compσηιψ({ | |
selector: 'app-function-works', | |
templateUrl: './function-works.component.html', | |
styleUrls: ['./function-works.component.css'] | |
}, MyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment