Pat Cavit
b71dc2762e
docs: merge latest docs from next
2017-05-01 22:46:23 -07:00
Pat Cavit
3ab20205ee
docs: fix typo
2017-04-07 13:12:19 -07:00
André Luiz dos Santos
ec915bf919
Typo
2017-04-03 14:46:53 -03:00
Pat Cavit
207dea91da
docs: merge 7ba74ad and friends
2017-03-28 11:37:07 -07:00
Pat Cavit
e88bddb3c8
docs: docs fixes and changelog
2017-03-27 15:14:36 -07:00
Pat Cavit
46ebb340d1
merge: next onto master
2017-03-27 14:21:52 -07:00
Isiah Meadows
40637fe99f
Update components.md [ci skip]
2017-03-27 12:41:45 -04:00
Pierre-Yves Gerardy
f7450c96b0
Document closure components (formerly known as "factory components") and flesh out class components docs
2017-03-27 16:47:45 +02:00
Pat Cavit
33aa1fa735
docs: merge docs from next to master
2017-03-24 15:36:53 -07:00
Barney Carroll
57d3de1e5c
Docs: component props aren't copied to instances
2017-02-26 17:29:43 +00:00
Leo
65941d1416
document classes
2017-02-19 08:29:35 -05:00
Leo
1620b147da
clean up repo
2017-01-30 11:18:47 -05:00
Leo
6ab2b6b6c3
merge to next
2017-01-30 11:04:14 -05:00
Leo
aee13901d8
docs tweaks
2017-01-26 20:46:32 -05:00
Leo Horie
b957bf66e8
expand section on fat components
2017-01-12 12:55:40 -05:00
Leo Horie
6ff5265bf8
docs on animation and css
2017-01-11 13:36:05 -05:00
Leo
31177c279f
fix component docs
2017-01-08 15:42:51 -05:00
Leo Horie
bedcd8bdbf
update docs re:onbeforeremove and clean up
2016-12-26 12:28:13 -05:00
Leo Horie
a18aadc837
Merge pull request #1431 from barneycarroll/demystify-component-antipatterns
...
Demystify component antipatterns
2016-11-28 09:19:21 -05:00
Barney Carroll
f040bfe470
Typos
2016-11-27 15:24:34 +00:00
Barney Carroll
b399af1073
Add vnode mutation warning under components documentation
2016-11-27 15:04:03 +00:00
Barney Carroll
1dd341fff5
Typo
2016-11-27 12:50:45 +00:00
Barney Carroll
2f5fe86caf
Revert & fine-tune wording
2016-11-27 12:49:38 +00:00
Barney Carroll
a835e6ac6a
Rephrase 'restrictive interfaces' & 'magic indices' to reflect common concerns
2016-11-27 12:17:00 +00:00
spacejack
2a6011e2c1
Add notes about passing data to components, avoid inadvertant lifecycle hooks.
2016-11-20 17:58:23 -05:00
maks feltrin
df517bf636
docs typo?
2016-10-22 16:45:19 +02:00
Carl Mungazi
00adb7ae0e
Update components.md ( #1337 )
...
Fixed typos.
2016-09-23 16:11:28 -07:00
Scott Simpson
3f70d20bb1
fix component name
2016-09-20 09:53:25 -07:00
Leo Horie
80c25e3809
rename routeresolver methods to {onmatch,view}
...
expose some piecemeal modules
rename internal xhr to request
mirror internal stream api to match public api
2016-08-17 00:10:47 -04:00
Leo Horie
a988276e9b
Revert "don't copy state anymore"
...
This reverts commit cece44d4ac .
2016-07-08 10:24:48 -04:00
Leo Horie
cece44d4ac
don't copy state anymore
2016-07-08 00:40:52 -04:00
Leo Horie
7318a0d88b
update docs re: component anti-patterns, lint docs
2016-07-07 13:23:16 -04:00
Leo Horie
4b6c4254ba
s/shouldUpdate/onbeforeupdate
2016-06-06 09:59:35 -04:00
Leo Horie
0ed3d20c4c
documentation fixes
2016-05-26 15:21:30 -04:00
Leo Horie
5815a590a8
test empty object
2016-05-24 23:18:11 -04:00
Richard Ivan
63d67e1d71
typo
...
typo
2016-05-24 16:44:50 +02:00
Leo Horie
e24e4e9a1a
style fixes in docs
2016-05-19 01:46:46 -04:00
Leo Horie
cd8b8b12e6
Some documentation
2016-05-19 01:22:01 -04:00
Alexandr Panchenko
4e8ca4035c
ContactList → ContactForm
2016-05-17 17:50:47 +03:00
Leo Horie
13fdb60f66
clean slate
2016-04-20 20:01:04 -04:00
pelonpelon
dc36588160
components.md - eliminate global variable introduced in previous commit
...
Oops!
2015-07-07 09:04:08 -05:00
pelonpelon
7ce8429bf4
Update components.md -- "Classic MVC" example
...
@ArthurClemens pointed out in this gitter comment:
https://gitter.im/lhorie/mithril.js?at=55664ba1d21e5ed02ff06e54
that the Classic MVC example is broken:
https://lhorie.github.io/mithril/components.html#classic-mvc
I wanted to show a working jsfiddle with these changes applied, but I couldn't figure out how to get a POST request working. I do, however, have a jsbin that is working, although there are significant changes in the code to allow for GET and POST.
http://jsbin.com/cokesu/2/edit?js,output
A redraw is called for every character entered in the jsbin but AFAICT, not in this PR. I don't know why. It's as though `oninput` is really `onchange`. It's possible to limit the redraw to once when the "save" button is clicked, but this requires a change in logic:
var ContactForm = {
controller: function(args) {
this.contact = m.prop(new Contact())
this.save = function(contact) {
Observable.trigger("saveContact", {contact: contact})
}
},
view: function(ctrl, args) {
var contact = ctrl.contact()
return m("form", [
m("label", "Name"),
m("input[name=name]"),
m("label", "Email"),
m("input[name=email]"),
m("button[type=button]", {onclick: function(){
contact = {
name: m.prop(this.parentNode.elements.name.value),
email: m.prop(this.parentNode.elements.email.value)
}
ctrl.save(contact)
}}, "Save")
])
}
}
2015-05-28 03:47:40 -05:00
Daniel Loomer
c622283877
components.md 'trigger', not 'broadcast'
2015-05-07 15:54:51 -04:00
Yoshiki Shibukawa
39c3118070
Update components.md
...
Fix sample code. Contact.list() should return a list of Contact instances.
2015-05-02 07:49:02 +09:00
Leo Horie
5a786009c5
remove references to m.module
2015-04-22 21:18:41 -04:00
Leo Horie
4d03595bb1
example
2015-04-13 22:17:00 -04:00
Leo Horie
9e8dc6998d
rework api
2015-04-09 22:44:45 -04:00
Leo Horie
6abb868c6b
remove stuff that got moved to api page
2015-04-06 22:54:00 -04:00
Leo Horie
d5619d412e
changes in the docs: rename modules to components, change idiomatic controller and view usage
2015-04-06 22:41:38 -04:00
Steven Loria
946ebeeb42
Add missing ctrl argument
2015-03-22 18:32:13 -04:00