angular - typescript ang2 include from location a or b depending on existence of file -


i have simple app.module.ts file includes component (among other things) in usual fashion:

import {topiclistcomponent} "./core/components/topic/topic-list.component"; 

this blindly attempt include ./core/components/topic/topic-list.component.. able like:

import {topiclistcomponent} "./override/components/topic/topic-list.component" || "./core/components/topic/topic-list.component"; 

currently have simple gulp system copies core files folder, copies override files (if any) same location th title suggests overrides core files.

but, possible manage in code opposed in build process open door more complex template/component override systems... maybe custom import function automatically checks override first , if not present imports core/


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -