Skip to content

Instantly share code, notes, and snippets.

@jorgeas80
Created October 4, 2016 09:47
Show Gist options
  • Save jorgeas80/a20bdc56d601f217f889850172ab48e7 to your computer and use it in GitHub Desktop.
Save jorgeas80/a20bdc56d601f217f889850172ab48e7 to your computer and use it in GitHub Desktop.
To be used with a code that needs json data
[
{
"id": "q1",
"text": "Property binding with [value]=\"foo\" or interpolation with {{foo}} results in",
"options": [
{
"id": "q1.a1",
"text": "One-way binding from the component to the view"
},
{
"id": "q1.a2",
"text": "One-way binding from the view to the component"
},
{
"id": "q1.a3",
"text": "Two-way binding"
}
],
"solution": "q1.a1"
},
{
"id": "q2",
"text": "Event binding with (click)=\"doSomething()\" results in",
"options": [
{
"id": "q2.a1",
"text": "One-way binding from the component to the view"
},
{
"id": "q2.a2",
"text": "One-way binding from the view to the component"
},
{
"id": "q2.a3",
"text": "Two-way binding"
}
],
"solution": "q2.a2"
},
{
"id": "q3",
"text": "Using ngModel with [(ngModel)]=\"foo\" results in",
"options": [
{
"id": "q3.a1",
"text": "One-way binding from the component to the view"
},
{
"id": "q3.a2",
"text": "One-way binding from the view to the component"
},
{
"id": "q3.a3",
"text": "Two-way binding"
}
],
"solution": "q3.a3"
},
{
"id": "q4",
"text": "ngFor is an example of",
"options": [
{
"id": "q4.a1",
"text": "Attribute directive"
},
{
"id": "q4.a2",
"text": "Structural directive"
},
{
"id": "q4.a3",
"text": "Destructuring assignment"
}
],
"solution": "q4.a2"
},
{
"id": "q5",
"text": "ngClass is an example of",
"options": [
{
"id": "q5.a1",
"text": "Attribute directive"
},
{
"id": "q5.a2",
"text": "Structural directive"
},
{
"id": "q5.a3",
"text": "Destructuring assignment"
}
],
"solution": "q5.a1"
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment