我不知道我错过了什么!
我有一个传奇,用户可以选择每种颜色的描述, 但是当我尝试编辑文本时,它会在视图中更新,但是一旦我刷新所有更改都会被恢复,那么如何在控制器中保留更改呢?
self
这是一个小提琴
http://jsfiddle.net/NfPcH/23697/
谢谢
答案 0 :(得分:1)
您没有将其保存在任何地方,因此在重新加载控制器初始化其SELECT datediff('2018-05-04', '2018-05-01') as `nights`,
'2018-05-01' as arrival,
'2018-05-04' as departure,
sum(property_bands.propband_pricedirect) as bookingprice,
sum(property_bands.propband_pricespecial) as bookingspecial,
datediff('2018-05-04', '2018-05-01')-(count(*)) as mismatch,
property_bands.propband_minduration,
properties.*,
resorts.resort_name,
resorts.resort_area,
resorts.resort_country,
resorts.resort_url,
resorts.resort_tripid,
resorts.resort_desc,
property_types.proptype_name, (
select booking_properties.booking_id from booking_properties where booking_properties.property_id = property_bands.property_id and ((booking_properties.bprop_start <= '2018-05-01' and booking_properties.bprop_end >= '2018-05-04')
or (booking_properties.bprop_start >= '2018-05-01' and booking_properties.bprop_start < '2018-05-04') or (booking_properties.bprop_end > '2018-05-01' and booking_properties.bprop_end <= '2018-05-04'))
and booking_properties.company_id = '100' and (booking_properties.bprop_deleted = '0000-00-00 00:00:00' or booking_properties.bprop_deleted > now()) and booking_properties.bprop_void < 1 limit 1) as booking_id
FROM dates, property_bands, properties, property_types, resorts
where properties.property_id = property_bands.property_id and property_types.proptype_id = properties.proptype_id
and dates.day_date >= '2018-05-01'
and dates.day_date < '2018-05-04'
and property_bands.propband_start <= dates.day_date
and property_bands.propband_end >= dates.day_date
and resorts.resort_id = properties.resort_id
and (property_bands.propband_deleted = '0000-00-00 00:00:00' or property_bands.propband_deleted > now())
and (properties.property_deleted = '0000-00-00 00:00:00' or properties.property_deleted > now())
and (resorts.resort_deleted = '0000-00-00 00:00:00' or resorts.resort_deleted > now())
group by property_bands.property_id order by properties.booking_count asc;
变量时。
对于透明度变化,您应该使用一些$scope
,或者您可以使用database
答案 1 :(得分:1)
好吧,因为您没有提供存储数据的任何信息......我使用localStorage
小提琴:http://jsfiddle.net/NfPcH/23699/
使用localStorage
不是一个好习惯......但基本上解决了你的问题......