ryancp / sailng

Sails.js + Angular = Awesome
MIT License
164 stars 38 forks source link

New Route for socket and glyphs #4

Closed johntom closed 10 years ago

johntom commented 10 years ago

Hi Ryan,

Results of further tests

1) I'm trying to add another view that uses soket.io and pretty much dupped messages to a todo collection. All the crud works and data looks perfect in the mongod collection but the view does not show current state like the messages view. Lines 22 thru 33 from assets/src/app/todos/index.js doesnt execute

I checked the entire project and can't see why the socket is not working.

2) I've never used less before and haven't figured how to use the date time (from bootstrap-ui) glyphs. See the message form. Just checking if my fix is the best way as I changed references in assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.js from span class=\"glyphicon glyphicon-chevron-up\" to span class=\"fa a-chevron-up\"

3) Next up is concepts from https://github.com/fnakstad/angular-client-side-auth that use in all my projects and testing with jade templates. My eventual goal is to update https://github.com/johntom/crmMeans which was a couse I gave at the last philly code camp. This repo needs some attention so I figured that the best way to test was to replace this repo with the latest of this awesome stack.

Thanks, John

johntom commented 10 years ago

Forgot the link see https://github.com/johntom/sailng John

johntom commented 10 years ago

Hi Ryan, Kijan cought my mistake and I will share as a good example of how to use angular-sails-mongo. I really got confused over my naming conventions and what how the previous version worked.

.controller( 'TodoCtrl', function TodoController( $scope, $sails, lodash, config, titleService, TodoModel,$filter, ngTableParams ) { $scope.newTodo = {}; $scope.todos = []; // must use name from \model and and Not $sails.on('message', $sails.on('todo', function (envelope) { ... Thanks again, John

ryancp commented 10 years ago

Hey John, sounds good. Glad you were able to get it working!