inherited is not working?

image
image

inherited is not working if exist parse()

Comments

  • In the first screenshot, your parse function will return the value of data.result to the model, while in the second screenshot data will be returned (this is the standard implementation of parse: source code), so these two scenarios are dealing with different data elements, which could explain the undefined values.
  • @aarontam is right. The constructor for enyo.Model passes the attributes ({user_id: "testName"} in your example) to parse. The default implementation of parse() just returns the data as passed to it. Your override returns data.result which doesn't exists for the object {user_id: "testName"} so you get undefined when getting it
Sign In or Register to comment.