Hi guys,
I am new in IOC and in AOP development. I started looking for wire specs and find out some interesting concepts. but I am having some doubts
Ex.
main.js
define({
contacts: {wire:'app/spec'},
editView: {
render: {
template: { module: 'text!app/template.html' },
replace: { module: 'i18n!app/strings' }
},
insert: { after: 'dom.first!#contrainer' },
on: {
'submit': 'form.getValues | contacts.update'
},
connect: {
'contacts.onChange': 'reset'
}
}
})
spec.js
define({
contacts: {
create:{},
before: {
add: 'cleanContact | generateMetaData',
update:'cleanContact | generateMetaData'
},
after: {
update:'cleanContact | generateMetaData'
}
},
})
I have few doubts related to main.js
1: what is contacte.update and when I am trying to put an alert in cleanContact method, its not poppingup while clicking on submit button.
2: If my application have 10 area , will I have 10 seperate main.js?
3: what about subView? how to wiredup subviews?
4: To perform data binding( thru cola.js) do we need to create seperate spec.js or can it be a part of main.js?
Appreciate the reply