You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it will make templates much more self-contained if there was an annotation declaring what interface the template requires from it's component and have an alias for this component inside of the template.
Example:
<template-declaration>
//define an interface this template requires.
interface IMyTemplate{
shoes: Shoe[],
currentUser: User
}
//get a reference to the component (must implement interface , otherwise compilation error)
myComponentAlias: IMyTemplate = component;
</template-declaration><div>
{{myComponentAlias.currentUser.name}} // fine
{{myComponentAlias.unknownProperty}} // compilation error
</div>
This would make a clear separation between layout&design vs view-logic. The designer would no longer need to refer to code and the coder would no longer need to refer to html to do their work.
I could swap different components for the same view , as long as they implement the required interface.
Now, I understand this is quite a demand and that it requires alot of work, templates now require compilation, have typescript inside of them etc...
But you wisards at angular are capable enough. Im sure @mhevery would like this feature.
The text was updated successfully, but these errors were encountered:
I think it will make templates much more self-contained if there was an annotation declaring what interface the template requires from it's component and have an alias for this component inside of the template.
Example:
This would make a clear separation between layout&design vs view-logic. The designer would no longer need to refer to code and the coder would no longer need to refer to html to do their work.
I could swap different components for the same view , as long as they implement the required interface.
Now, I understand this is quite a demand and that it requires alot of work, templates now require compilation, have typescript inside of them etc...
But you wisards at angular are capable enough. Im sure @mhevery would like this feature.
The text was updated successfully, but these errors were encountered: