Store "this" object in database


#1

How can I store “this” object in the database?


#2

I can’t think of any object in an Ionic application for which this would make sense.


#3

@rapropos I am talking about the “this” object.


#4

That’s a meaningless concept absent context. “this” is an instance of a particular class. If you are talking about framework-managed objects such as pages or services, they aren’t serializable. They are managed by Angular DI. If you are talking about some model-layer class you have made, you should be serializing it from outside it, not within. Therefore, I cannot think of any context in an Ionic application where attempting to serialize “this” makes any sense.


#5

You explained it beautifully. Thanks.