Skip to content
  • totten's avatar
    Automatically detect requirements in *.aff.html · b8f1aacf
    totten authored
    PART A: EXPORT LIST
    
    Suppose you create a form `downstreamForm.aff.html`.
    
    The metadata for `downstreamForm` will indicate that it exports an element `<downstream-form/>`:
    
    ```php
    $angularModules['downstreamForm']['exports']['el'] = ['downstream-form'];
    ```
    
    PART B: AUTO-REQUIRES
    
    Suppose that:
    
    1. he form `downstreamForm.aff.html` uses element `<upstream-el/>`.
    2. The `$angularModules['upsteamMod']['exports']['el']` defines an exported element `upstream-el`.
    
    Then the `downstreamForm` module will automatically requires the `upstreamMod`, as in
    
    ```php
    $angularModules['downstreamForm']['requires'][] = 'upstreamMod';
    ```
    b8f1aacf