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
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
Steven Loria
3b012187c0
Consistently use args for arguments passed to a module
2015-03-22 18:07:46 -04:00
Steven Loria
c267114f06
Correction to "Aggregation of resp." example
2015-03-22 18:06:43 -04:00
Leo Horie
4632a61959
fix observer code example
2015-03-18 23:22:43 -04:00
Leo Horie
5011dd97b6
more docs about component-based architecture
2015-03-17 23:04:05 -04:00
Leo Horie
fd1090f9d8
Merge branch 'comp-doc-fixes' of https://github.com/leeoniya/mithril.js into leeoniya-comp-doc-fixes
...
Conflicts:
docs/components.md
2015-03-17 09:00:02 -04:00
Leo Horie
24695d4cc3
Merge pull request #490 from barneycarroll/patch-1
...
Code typo in `unload` documentation
2015-03-17 08:55:37 -04:00
Barney Carroll
837c0241cc
Fixed uploader demo code
...
Still needs styling for the drop area to occupy any space though. Worth putting in as inline styles?
2015-03-17 09:06:09 +00:00
Barney Carroll
7585d9e5a3
Code typo in unload documentation
2015-03-17 08:24:07 +00:00
Leon Sorokin
f0c0c3c0be
fix drag-n-drop uploader docs
2015-03-16 23:43:22 -05:00
Leo Horie
0ea9fac07e
add example to docs
2015-03-16 23:28:38 -04:00
Leo Horie
bdff136e9a
ordered lists
2015-03-16 23:09:16 -04:00
Leo Horie
5a64e56a03
beefing up components docs
2015-03-16 22:58:31 -04:00
Leo Horie
0f45d22448
improve docs
2015-03-13 22:52:34 -04:00
Leo Horie
90843f6bdb
add docs about async components
2015-02-26 22:51:07 -05:00
Leo Horie
0d819f082b
ordered list in docs
2015-02-18 22:05:52 -05:00
Leo Horie
8fadeadb8f
some docs
2015-02-18 21:59:54 -05:00
Keenan Lidral-Porter
e690134478
replace new function pattern with IIFE and fixes errors in example code
2014-12-07 15:14:38 -08:00
Leo Horie
cf3b77c161
docs and macro fix
2014-10-29 09:19:02 -04:00
Leo Horie
bfd043aa5e
guide updates
2014-10-01 22:17:49 -04:00
Leo Horie
4184da27c8
update docs about components
2014-09-26 21:42:36 -04:00
Leo Horie
9bd0585b41
improving components docs
2014-09-25 07:25:51 -04:00
nickolasgregory
46e8ffc627
tweaked example components setter-getter
...
Pass the function, not the returned object, to the autocompleter component.
Allows `dashboard` to pass results from `m.request()` - Tested OK
2014-09-15 20:01:14 +10:00