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,
        ]);
    }