I have the following json:
[
{
"normal" :{
"font": "Burlington Script.ttf",
"fontFamily": "sf_burlington_scriptregular",
"fontName": "Burlington Script"
},
"bold" : {
"font": "SF_Burlington_Script_Bold.ttf",
"fontFamily": "sf_burlington_scriptbold",
"fontName": "Burlington Script"
},
"italic" : {
"font": "SF_Burlington_Script_Italic.ttf",
"fontFamily": "sf_burlington_scriptitalic",
"fontName": "Burlington Script"
},
"bold-italic": {
"font": "SF_Burlington_Script_Bold_Italic.ttf",
"fontFamily": "sf_burlington_scriptBdIt",
"fontName": "Burlington Script"
}
},
{
"normal" :{
"font": "Some_Script.ttf",
"fontFamily": "Some_scriptregular",
"fontName" : "Some Script"
},
"bold" : {
"font": "Some_Script_Bold.ttf",
"fontFamily": "Some_scriptbold",
"fontName" : "Some Script"
},
"italic" : {
"font": "Some_Script_Italic.ttf",
"fontFamily": "Some_scriptitalic",
"fontName" : "Some Script"
},
"bold-italic": {
"font": "Some_Script_Bold_Italic.ttf",
"fontFamily": "Some_scriptBdIt",
"fontName" : "Some Script"
}
}
]
what i want to do is display the fontName in the drop down under "normal" only and have the value be fontFamily.
I have tried
<select
ng-model="selectedFont"
ng-options="fonts as fonts.normal.fontName for fonts in designFonts" required>
</select>
but no luck. i am setting $scope.designFonts in my controller to whatever the json is.