Top "Angular2-template" questions

For questions referencing Angular Template Syntax including: interpolation, input(property) bindings, output(event) bindings, two-way binding, local variables, star syntax, etc.

Angular2, TypeScript, How to read/bind attribute value to component class (undefined in ngOnInit)

can someone please advice me how to read/bind attribute value to @component class, which seems to be undefined in …

typescript angular angular2-template angular2-directives
How to send a value from one component to another?

I make a componenet in which I have one input field and button.On click of button I am diplaying …

angular angular2-routing angular2-template angular2-directives
Angular2 using @Inputs with <router-outlet>s

I have a sub-navigation in my page that displays some subviews below a common main view. I would like to …

typescript angular angular2-template
Angular 2: Module not found: Error: Can't resolve

I have a simple app created with Angular-CLI, I wanted to refactor and move the app.component.ts code in …

angular angular2-template angular2-modules
How to pass a string value to a component in angular2

I'd like to pass a string value to a component in angular2, but it doesn't work with the default binding. …

angular angular2-template
How to display error message based on custom validation rules in Angular 2?

I am using a template-driven approach to building forms in Angular 2 and I have successfully created custom validators that I …

typescript angular angular2-template angular2-directives angular2-forms
How to trigger a change event manually - angular2

Given the following components: @Component({ selector: 'compA', template: template: `<compB [item]=item></compB>` }) export class CompA { …

angular typescript angular2-template angular2-directives
Dynamically set attribute on component in html template angular 2

I am trying to set an attribute on a component if a certain expression is true. Could someone give me …

data-binding angular angular2-template
Hide elements based on routing in Angular2 rc1

I have some elements I want on every page except the login page. I'd like to use ngIf or possibly …

typescript angular angular2-routing angular2-template
Angular 2 Routing Does Not Work When Deployed to Http Server

I am going to develop a simple Angular 2 application. I have created a project with routing, using Angular CLI and …

angular npm angular2-routing angular-cli angular2-template