Skip to content
This repository was archived by the owner on Aug 13, 2021. It is now read-only.
This repository was archived by the owner on Aug 13, 2021. It is now read-only.

Correct way injecting angularSails? #72

@kesgri

Description

@kesgri

Hi,
If I'm using var myApp = angular.module('app ', ['sails.io']); and after that injecting $sailsSocket in service/controller/...
I have no .on method, but I just use .subscribe (same thing).
If I'm var myApp = angular.module('app ', ['angularSails.io']); and after that injecting $sailsSocket
$sailsSocket is just plain function.
and after I do for example var socket = $sailsSocket(); I can use .on method but not .subscribe.
Looks like 'sails.io' is the way to go as it injects proper object, but why such a different behavior?

p.s. I had difficult time making angularSails to work. as file name is 'ngsails.js', inject you should 'sails.io' and documentation says only about methods you can use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions