-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/schematicsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration
Milestone
Description
It seems feature to add conditional x-prompts is missing in angular schematics.
Requirement : To display conditional prompts, based on the previous selection ( "Analytics", in this case ).
Problem : For any selection, it is still displaying the prompt to add Google Analytics's Tracking Id even if i select AppDynamics or none.
References : Applying Subschemas Conditionally
Angular Schematics
Note: For Simplicity, i have removed "allOf","anyOf" etc. and code for any other analytics tool, still it was not working.
Code (Schema.json):
{
"$schema": "http://json-schema.org/schema",
"id": "MyDemoSchema",
"title": "My Demo Schematics Schema",
"type": "object",
"properties": {
"analytics": {
"enum": [
"none",
"GoogleAnalytics",
"AppDynamics"
],
"x-prompt": "Which Analytics would you like to use?"
}
},
"if": {
"properties": {
"analytics": {
"const": "GoogleAnalytics"
}
}
},
"then": {
"properties": {
"GoogleAnalytics": {
"type": "string",
"x-prompt": "Enter Tracking ID?"
}
}
}
}
Harpush, xaosaki, Hubka, Stupidism, neox5 and 31 moreEmmanuelRoux
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/schematicsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration