Initial ng-model value not set in select

前端 未结 4 1240
庸人自扰
庸人自扰 2021-02-05 06:46

I have an enum (I code using TypeScript):

export enum AddressType
{
    NotSet = 0,

    Home = 1,
    Work = 2,
    Headquarters = 3,

    Custom = -1,
}
         


        
4条回答
  •  执念已碎
    2021-02-05 07:27

    I often run into this when using number id's. My way around this quirk is to add ''+ to convert it to string type:

    
                            
        
    提交评论

提交回复
热议问题