I would not suggest this specifically for the reason that you will not be
able to package up your application using WebPack or SystemJS builder,
meaning that your application, if it has a lot of modules/resources, could
be VERY slow to load, especially so if a device has a fairly limited cache
(ie. mobile devices).
That being said, you might be able to do this by modifying the map member
in your SystemJS config before you pass it to System.config. The
documentation states specifically that this is for modules, so it's
possible this will not work for files within your app module. Example:
System.config({
map: {
'./router.config': determineRouterConfigUrl()
}
});
If that doesn't work, you can try the path member.
https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#map
On Wed, Jul 13, 2016 at 12:39 PM, 'breaddes' via AngularJS <
[email protected]> wrote:
> I am reading the GET params of a url and decide which routes must be
> loaded. That is what I am trying to do. So for example there a five
> route.config files and each is one depends on the url call.
>
> Am Mittwoch, 13. Juli 2016 18:25:15 UTC+2 schrieb Lucas Lacroix:
>>
>> I'm not sure I understand your use case.
>> It seems like you want to use one URL for '@angular/core' if a parameter
>> has a particular value and a different URL if it has another. Is that what
>> you're trying to do?
>>
>> On Wed, Jul 13, 2016 at 11:49 AM, Lucas Lacroix <[email protected]>
>> wrote:
>>
>>> No. Typescript knows nothing about scopes. It merely searches in
>>> node_modules for a FOLDER '@angular/core' (or whatever package you're
>>> referencing). There is nothing special Typescript needs to do.
>>>
>>> On Wed, Jul 13, 2016 at 11:47 AM, 'breaddes' via AngularJS <
>>> [email protected]> wrote:
>>>
>>>> Thank you Kevin. That means Typescript searches for that scope in
>>>> node_modules automatically? I have different route configs which depend on
>>>> url parameters. That is why I would like to set my import path dynamically
>>>> and build a custom scope. It is one app, but it can bootstrap different
>>>> routes. Any ideas on that?
>>>>
>>>> Am Mittwoch, 13. Juli 2016 17:16:53 UTC+2 schrieb Kevin Fernandes:
>>>>>
>>>>> Its not the short form that Typescript knows about, its the fact that
>>>>> its in the node_modules folder I believe - typescript supports the
>>>>> node_modules folder directly/natively.
>>>>> The short form by the way is called a "scope" in NPM language. We use
>>>>> scopes to publish to a private repository to keep components from
>>>>> different
>>>>> projects and groups together.
>>>>>
>>>>> On Wed, Jul 13, 2016 at 10:21 AM, 'breaddes' via AngularJS <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Angular uses the short form of @angular to reference it's components.
>>>>>> That's makes it easy for refactoring. I tried to write my own map using
>>>>>> the
>>>>>> keyword @edition in the system config. Now how does Typescript now about
>>>>>> that short form? I haven't found any clou in the angular files.
>>>>>>
>>>>>> --
>>>>>> 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.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Kevin F.
>>>>>
>>>> --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Lucas Lacroix
>>> Computer Scientist
>>> System Technology Division, MEDITECH <http://ehr.meditech.com>
>>> 781-774-2293
>>>
>>
>>
>>
>> --
>> Lucas Lacroix
>> Computer Scientist
>> System Technology Division, MEDITECH <http://ehr.meditech.com>
>> 781-774-2293
>>
> --
> 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.
>
--
Lucas Lacroix
Computer Scientist
System Technology Division, MEDITECH <http://ehr.meditech.com>
781-774-2293
--
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.