How to Define custom property in the same component in angular2

angular

Solution

`<p>` doesn't have a `name` property. You can bind to the `name` attribute using

[attr.name]="name"

or alternatively

attr.name="{{name}}"

Use this 2nd form (interpolation) only for binding string values, because the passed value will always be stringified.

Problem

I am trying to define a custom property count. But following gives error:Can't bind to 'count' since it isn't a known property of 'p'. How to remove this error and make count a custom property of `<p>` other.component.html ``` <p [count] = "10"> other works! </p> ``` other.component.ts ``` import {Component, Input, OnInit} from '@angular/core'; @Component({ selector: 'app-other', templateUrl: './other.component.html', styleUrls: ['./other.component.css'] }) export class OtherComponent implements OnInit { @Input() count = 10; constructor() { } ngOnInit() { } } ```

Original source