nanocomponent-adapters
nanocomponent-adapters copied to clipboard
angular adapter
@bendrucker @lrlna I honestly don't know who else to ask lol, if you could help out writing an adapter I'd owe you one haha :sparkles:
can totes help out with this one :sparkles:
Oh actually, which angular? I can help you with pre-2.0 directive; haven't done 2.0 stuff.
On Mon, Jan 30, 2017, 21:03 Yoshua Wuyts [email protected] wrote:
@bendrucker https://github.com/bendrucker @lrlna https://github.com/lrlna I honestly don't know who else to ask lol, if you could help out writing an adapter I'd owe you one haha ✨
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yoshuawuyts/nanocomponent-adapters/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AHu3CA3T9uZVVqGsSMaxYXRMd8f_QueNks5rXlAxgaJpZM4Lx6VK .
Same, haven't touched v2
Angular v1 stuff would be grand I think; if I'm not mistaken that seems to be the thing that's used most nowadays anyway / what people end up working with - so if we can make their lives easier would be grand :D
On Mon, Jan 30, 2017 at 1:38 PM Ben Drucker [email protected] wrote:
Same, haven't touched v2
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yoshuawuyts/nanocomponent-adapters/issues/3#issuecomment-276199567, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlei4xSnVlUPgXrPE6k8UmLGkbbkkLks5rXlhugaJpZM4Lx6VK .
Cool. Shouldn't be too hard. Any thoughts on unit testing this stuff?
ohh, yeah unit tests would be neat - didn't write any so far, but I bet
using tape-run
we could come a long way; probably should also add some to
nanocomponent
haha
On Mon, Jan 30, 2017 at 3:22 PM Ben Drucker [email protected] wrote:
Cool. Shouldn't be too hard. Any thoughts on unit testing this stuff?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yoshuawuyts/nanocomponent-adapters/issues/3#issuecomment-276224258, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlesHrdzkeRWh4foiZ-XNnnRA5hJFrks5rXnCYgaJpZM4Lx6VK .
uhhhh i haven't componentized angular in so long, so I am not sure if this is the right approach atm. Something like this for the spec?
var nanoToAngular = require('nanocomponent-adapters/angular')
module.exports = angular
.module('nano', [])
.directive('nanocomponent', nanoToAngular)
and hook it up in your html:
<nanocomponent render></nanocomponent>
<nanocomponent onupdate></nanocomponent>
So then component vals get handled in html. That will mean that the directive itself will have to handle all the nanocomponent interaction too.
Alternatively handle it within the $scope
instead of working inside html directly.
That looks right to me!
Hey @lrlna, @bendrucker, @yoshuawuyts, may I suggest the following naming convention: nanocomponent-adapters/angularjs for Angular 1.x nanocomponent-adapters/angular for Angular 2+
Recently there's been a lot of discussion around this topic and the Angular team is settling with "just Angular" for the newer versions of the framework and AngularJS for 1.x See "Naming guidelines" section
Also, I've been doing some Angular work so I'd be happy to port the AngularJS version.
If that's the convention, it sounds v reasonable to me. Afaik nobody's offered to write the Angular (2.x+) version yet so help would def be welcome!
On Sun, Feb 12, 2017, 18:27 Carlos Vega [email protected] wrote:
Hey @lrlna https://github.com/lrlna, @bendrucker https://github.com/bendrucker, @yoshuawuyts https://github.com/yoshuawuyts, may I suggest the following naming convention: nanocomponent-adapters/angularjs for Angular 1.x nanocomponent-adapters/angular for Angular 2+
Recently there's been a lot of discussion around this topic and the Angular team is settling with "just Angular" for the newer versions of the framework and AngularJS for 1.x See "Naming guidelines" section http://angularjs.blogspot.com/2016/12/ok-let-me-explain-its-going-to-be.html
Also, I've been doing some Angular work so I'd be happy to port the AngularJS version.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/yoshuawuyts/nanocomponent-adapters/issues/3#issuecomment-279233693, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlev6milx4yaG-I4ZMYyTGMlhayGTFks5rb0EIgaJpZM4Lx6VK .
fyi, PR #6 adds support for custom elements and, consequently, for Angular (2+)
from angular 1.5 there's also the component
method - it's just sugar on top of a directive but it would be cool if there were unit tests passing for both directive
and component