Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular adapter #3

Open
yoshuawuyts opened this issue Jan 30, 2017 · 12 comments
Open

angular adapter #3

yoshuawuyts opened this issue Jan 30, 2017 · 12 comments

Comments

@yoshuawuyts
Copy link
Member

@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 ✨

@lrlna
Copy link
Member

lrlna commented Jan 30, 2017

can totes help out with this one ✨

@lrlna
Copy link
Member

lrlna commented Jan 30, 2017 via email

@bendrucker
Copy link

Same, haven't touched v2

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Jan 30, 2017 via email

@bendrucker
Copy link

Cool. Shouldn't be too hard. Any thoughts on unit testing this stuff?

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Jan 30, 2017 via email

@lrlna
Copy link
Member

lrlna commented Feb 3, 2017

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.

@bendrucker
Copy link

That looks right to me!

@alterx
Copy link
Collaborator

alterx commented Feb 12, 2017

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.

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Feb 13, 2017 via email

@alterx
Copy link
Collaborator

alterx commented Feb 14, 2017

fyi, PR #6 adds support for custom elements and, consequently, for Angular (2+)

@davidmarkclements
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants