use JSON Schema + Form definition (condition) http://schemaform.io/ https://github.com/Textalk/angular-schema-form