-
Notifications
You must be signed in to change notification settings - Fork 154
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
Just one pipe? #4
Comments
Yes, only time ago at the moment. Contributions are always appreciated! Are there any other pipes that you need? |
I guess I would need to know the intended scope of this package. If would this completely wrap around moment and use pipes for things like formatting or is it intended to be used for more edge case manipulations? |
Summarizing some of the leanings from I always like to see if a specific feature is valuable to some users before developing it, so user needs greatly shape the set of features in the library. That's also why I asked whether there is something particular that you need... |
Formatting was the one I was looking for specifically. |
Something like |
Yea, that would work. This brings up interesting questions about the use of moment in angular. Would we be using the pipe system to generate moment objects that we then send into other moment pipes or would we simple use javascript native date objects and only use moment for display of the native date objects? I am needing to take today's date and set it to the beginning of the day. This would be easy with a angular pip of The alternative is to use js native date and just do:
How do you envision moment being used within a more complex date oriented application? |
This is a good question. Based on my experience from In general, we have 3 types of pipes there:
I think we can start by implementing Thoughts? |
I am good with starting with just native |
Yes, that makes sense to me. If you can help with contributing |
I have already started on that and will do more tonight. Forgive my lack of experience, I am new to Angular 2. Can you only use Pipes from within the component template (HTML) or is it possible to use them from within the component class itself? |
Questions are always welcome :) Pipes are intended to be used from template. Nothing is stopping you from creating an instance of the class directly within Javascript and call the methods (that's what we do in the unit-tests), though, in this case, you can simply call |
Makes sense to me. Would we then need to import moment into any component that intends to use it? Moving further conversation of this into a gitter room for now unless you want to keep the log here. https://gitter.im/HeathNaylor/angular2-moment |
So we already have a |
Is there only the time ago pipe right now? Does this need contributions?
The text was updated successfully, but these errors were encountered: