Hi Sander,
thank you very much for your idea. It is actually only the data that are
different. I need to process them differently that's why I need to setup
three models. What I came up now is to put the models into the RouteConfig
on the data object. Then I have a placeholder token which is called
„DataModel” and I change the provided alias class according the data Model,
the route provides:
{provide: DataModel, useFactory: (route:ActivatedRoute) => {
return new route.snapshot.data['model']
}
, deps: [ActivatedRoute]
}
That works fine but I wondered if this is also possible for a subscriber or
observable of route.data.
Am Freitag, 22. Juli 2016 16:16:56 UTC+2 schrieb Sander Elias:
>
> HI Breaddes,
>
> I would create 3 different 'holder' components, that hook up the 3
> different services to its internal components that stays the same. While
> this might be an optional solution in your case, I have a gut feeling that
> you are taking the right approach in this matter. Usually this is a sign of
> components that are overloaded and should be split.
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.