Giter VIP home page Giter VIP logo

Comments (5)

tarlepp avatar tarlepp commented on July 18, 2024

The afterward result example would be helpfull.

from angular-sailsjs-boilerplate-frontend.

jjgonver avatar jjgonver commented on July 18, 2024

The result of the newValue of $scope.votesSurvey contains only register of VoteModel:

0:Object
  createdAt:"2016-08-21T08:18:47.000Z"
  createdUser:4
  id:26
  respuesta:19
  updatedAt:"2016-08-21T08:18:47.000Z"
  updatedUser:4
  userId: 4
  __proto__:Object
1:Object
  createdAt:"2016-08-21T08:19:09.000Z"
  createdUser:3
  id:27
  respuesta:19
  updatedAt:"2016-08-21T08:19:09.000Z"
  updatedUser:3
  userId: 3
...

from angular-sailsjs-boilerplate-frontend.

tarlepp avatar tarlepp commented on July 18, 2024

So is VotoModel for votesSurvey or just for votes?

from angular-sailsjs-boilerplate-frontend.

tarlepp avatar tarlepp commented on July 18, 2024

Actually...

In your resolve part you use AnswerModel and then in controller you assign that resolve object to $scope.votesSurvey = _votesSurvey; and then you set VotoModel.setScope($scope, false, 'votesSurvey');...

So there is the reason. First in your resolve part you use model A and then in controller you set model B to be the same, so just a logic problem on your end - and not actual issue about this project.

from angular-sailsjs-boilerplate-frontend.

jjgonver avatar jjgonver commented on July 18, 2024

Well. votesSurvey is a join between AnswersModel and VoteModel.
Meanwhile, a solved this with injected _votes -> return VoteModel.load(), after that I setScope to votes (that contain all votes for all surveys) and inside the controller make the filter.
But, for curiosity, is there a way to injected a join tables and make this join tables visible to the scope/socket events? Thanks

from angular-sailsjs-boilerplate-frontend.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.