Q:

angular - is it okay to have same property name across different components?

Hello Ive tried to do my own research on this topic but I cant seem to find a good answer so I decided to ask it here.
Say I have two component .ts files. Is it allowed to have properties that have the same name between them? For example:
search.component.ts
export class SearchComponent implements OnInit {
  search: string;
}

recent-search.component.ts
export class RecentSearchComponent implements OnInit {
  search: string;
}

They both have the same search: string; property. Will this ever clash and cause errors in the future? 
Furthermore, what about services? Will components that use services that have the same named properties between them cause issues?
Thanks

A:

The search property is scoped to the component class. Since the search properties are isolated and independent, they would never conflict as the class is the parent object. 
There are exceptions which could create conflicts. For example, if you were to inherit using a super() and have the property is the child class without a modifier.
Additionally, you cannot have a component with duplicate property names such as below:
export class RecentSearchComponent implements OnInit {
    search: string;
    search: string;
}

