--
You received this message because you are subscribed to the Google Groups "Angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
Of course not :-)
> As far as displaying a save button only on change here is an example:
> http://angularjs.org/Cookbook:AdvancedForm
> The basic idea is that you have a master copy which came from the server and
> working copy which the user is editing.
> Cancel: means copy master to working
> Save: means save working and server return to master, then cancel
> Enable save: when master != working.
> again everything is explained
> here: http://angularjs.org/Cookbook:AdvancedForm
> -- misko
Damn. I should have noticed that, since I started from that example :-)
--
...2share!2flame... http://blog.rot13.org
I looked at your code and noticed several things that we need to work
on when evangelizing and developing angular:
- angular makes TDD easy, and you should never write any angular code
without tests
- putting code into script tags in html templates will prevent you
from testing the code
- we need a better way to debug angular apps during development
- we need more examples of complicated web apps
- we need OOB integration with CouchDB as we think that they make an ideal match
Again, thanks for sharing your experience. Feel free to ask questions
when you need help.
/i
PS: and now go write some tests ;-)
I totally agree, comming from perl background :-)
> - putting code into script tags in html templates will prevent you
> from testing the code
True, it was just convinient to edit single file while experimenting.
> - we need a better way to debug angular apps during development
Only combination that I found useful was firefox with firebug which
returned useful stacktraces as opposed to chrome which didn't.
> - we need more examples of complicated web apps
> - we need OOB integration with CouchDB as we think that they make an ideal match
I'm using CouchDB as back-end right now, and it's mostly direct
translation from REST requests to couch.
I would love to deploy whole applicaton (javascript, html) into couchdb
itself, which would make deployment a simple replication to public
couchdb instance :-)
> Again, thanks for sharing your experience. Feel free to ask questions
> when you need help.
>
> /i
>
> PS: and now go write some tests ;-)
I took a look under test/ in angular distribution and they look really
nice and readable. However, I don't know how to run them. text.sh
results in:
java.lang.RuntimeException: java.net.ConnectException: Connection refused
which is probably java configuration error, but I don't really know
where to start with it.
if you want to get to the same state, you need to copy the following
files to your project dir:
- server.sh
- test.sh
- lib/jasmine-1.0.1/
- lib/jasmine-jstd-adapter/
- lib/jstestdriver/
you'll need to edit the first two files and fix the paths appropriately.
Additionally, you should copy angular files (all in
code.angularjs.org/angular-x.y.z.tgz) into lib/angular
Lastly, you'll need to create jsTestDriver.conf file in the root of
your project and fill it with something like:
server: http://localhost:9876
load:
- lib/jasmine-1.0.1/jasmine.js
- lib/jasmine-jstd-adapter/JasmineAdapter.js
- lib/angular-x.y.z.js
- src/*.js
- lib/angular/angular-mocks-x.y.z.js
- test/*.js
That's it. Let us know if you can't get it to work.
/i
$ ng "my-new-app"
creating my-new-app dir... done
creating my-new-app/lib dir... done
copying latest angular to /lib... done
copying latest jstestdriver to lib/... done
copying jasmine to lib/... done
copying jasmine adapter to lib/ done
generating jstdconfig file... done
...
...
$ ng start-test-server
done
and now you are ready to start hacking :)
/i