是否可以在同一个 Spine.js 中有两个控制器:Apartments 和 Map。选择公寓时,有没有办法调用获取地图做某事?
# Apartments
class Show extends Spine.Controller
events:
'click [data-type=edit]': 'edit'
'click [data-type=back]': 'back'
constructor: ->
super
@active (params) ->
@change(params.id)
change: (id) ->
@item = Apartment.find(id)
@render()
render: ->
@html @view('apartments/show')(@item)
# also update the map here.