Call a function on click event in Angular 2?

How to declare a function inside a component (typescript) and call it on a click event in Angular 2? Following is th...

angular's ng-init alternative in Angular 2?

What is the alternative of ng-init="myText='Hello World!'" in Angular 2 to add in the template, not in the component...

Angular: Cannot Get /?

I am trying to open, build and run someone else's Angular 4 project but I am not able to view the project when I run...

Remove or add class in Angular?

I have a list and the plugin (dragula) I used, adds certain CSS class on certain action. I am using Angular 5. I wan...

Optional property class in typescript?

I'm new in typescript and I want to know what is the utility of optional property class in typescript? And what is t...

Get element by id - Angular2?

I have a code: document.getElementById('loginInput').value = '123'; But while compiling the code I receive follow...

How to make a simple JSONP asynchronous request in Angular 2??

I'm trying to convert the following Angular 1 code to Angular 2: $http.jsonp('https://accounts.google.com/logout');...

Call a function on click event in Angular 2?

How to declare a function inside a component (typescript) and call it on a click event in Angular 2? Following is th...