src/helpers/Angular.php
protected static function injector($type, $ngModel, $label, $options = [], array $mergeOptions = [])
    {
        // parse boolean values to integer values is it would not bind the values correctly to the angular directive.
        foreach ($mergeOptions as $key => $value) {
            if (!is_array($value) && is_bool($value)) {
                $mergeOptions[$key] = (int) $value;
            }
        }

        $opt = array_merge($mergeOptions, [
            'model' => $ngModel,
            'label' => $label,
            'options' => $options,
            'fieldid' => Inflector::camel2id(Inflector::camelize($ngModel.'-'.$type)),
            'fieldname' => Inflector::camel2id(Inflector::camelize($ngModel)),
        ]);

        return new AngularObject([
            'type' => $type,
            'options' => $opt,
        ]);
    }
protected static function injector($type, $ngModel, $label, $options = [], array $mergeOptions = [])
    {
        // parse boolean values to integer values is it would not bind the values correctly to the angular directive.
        foreach ($mergeOptions as $key => $value) {
            if (!is_array($value) && is_bool($value)) {
                $mergeOptions[$key] = (int) $value;
            }
        }

        $opt = array_merge($mergeOptions, [
            'model' => $ngModel,
            'label' => $label,
            'options' => $options,
            'fieldid' => Inflector::camel2id(Inflector::camelize($ngModel.'-'.$type)),
            'fieldname' => Inflector::camel2id(Inflector::camelize($ngModel)),
        ]);

        return new AngularObject([
            'type' => $type,
            'options' => $opt,
        ]);
    }
protected static function injector ( $ type , $ ngModel , $ label , $ options = [ ] , array $ mergeOptions = [ ] ) { // parse boolean values to integer values is it would not bind the values correctly to the angular directive. foreach ( $ mergeOptions as $ key => $ value ) { if ( ! is_array ( $ value ) && is_bool ( $ value ) ) { $ mergeOptions [ $ key ] = ( int ) $ value ; } } $ opt = array_merge ( $ mergeOptions , [ 'model' => $ ngModel , 'label' => $ label , 'options' => $ options , 'fieldid' => Inflector :: camel2id ( Inflector :: camelize ( $ ngModel . '-' . $ type ) ) , 'fieldname' => Inflector :: camel2id ( Inflector :: camelize ( $ ngModel ) ) , ] ) ; return new AngularObject ( [ 'type' => $ type , 'options' => $ opt , ] ) ; }
Internal method to use to create the angular injector helper method like in angular context of directives.js

```
"dir": "=",
"model": "=",
"options": "=",
"label": "@label",
"grid": "@grid",
"fieldid": "@fieldid",
"fieldname": "@fieldname",
"placeholder": "@placeholder",
"initvalue": "@initvalue"
```

@param string $type
@param string $ngModel
@param string $label
@param array $options The options parameter is mostly a data provider for the directive an is depending on the type.
@param array $mergeOptions Additonal attributes to be set for the tag $type.
+ fieldid:
+ fieldname:
+ placeholder:
+ initvalue:
@return AngularObject:
Internal method to use to create the angular injector helper method like in angular context of directives . js