src/helpers/Angular.php
public static function asyncRequest($ngModel, $label, $api, $fields, array $options = [])
    {
        return self::injector(TYpesInterface::TYPE_ASYNC_VALUE, $ngModel, $label, [], ['api' => $api, 'fields' => $fields]);
    }
public static function asyncRequest($ngModel, $label, $api, $fields, array $options = [])
    {
        return self::injector(TYpesInterface::TYPE_ASYNC_VALUE, $ngModel, $label, [], ['api' => $api, 'fields' => $fields]);
    }
public static function asyncRequest ( $ ngModel , $ label , $ api , $ fields , array $ options = [ ] ) { return self :: injector ( TYpesInterface :: TYPE_ASYNC_VALUE , $ ngModel , $ label , [ ] , [ 'api' => $ api , 'fields' => $ fields ] ) ; }
Generates a directive which requies a value from an api where the model is the primary key field of the api.
Angular code example

```js
zaa-async-value model="theModel" label="Hello world" api="admin/api-admin-users" fields="[foo,bar]" />
```

@param string $ngModel The name of the ng model which should be used for data binding.
@param string $label The label to display for the form input.
@param string $api The path to the api endpoint like `admin/api-admin-users`.
@param array $fields An array with all fiels which should be requested from the api
@param array $options
@since 1.2.1
@return AngularObject
Generates a directive which requies a value from an api where the model is the primary key field of the api . Angular code example