Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing ANGULAR-SAILS in Laravel-Angular-Admin #99

Open
redleon00 opened this issue Feb 24, 2018 · 5 comments
Open

Implementing ANGULAR-SAILS in Laravel-Angular-Admin #99

redleon00 opened this issue Feb 24, 2018 · 5 comments

Comments

@redleon00
Copy link

Hi, i have some proble when i try to implement angular-sails in my angular-laravel-admin project.
I install angular-sail package with bower and in my index.module.js i have this:
angular.module('app.components', [ 'ui.router', 'angular-loading-bar', 'restangular', 'ngStorage', 'satellizer', 'ui.bootstrap', 'chart.js', 'mm.acl', 'datatables', 'datatables.bootstrap', 'checklist-model', "angular-sails" ])
and in my component look like this

class EmissionPolicyListsController{ constructor($scope, $state, $log, $compile, DTOptionsBuilder, DTColumnBuilder, API, $stateParams, $uibModal, $http, ngSails){
when i run the app, show me this error message
Error: [$injector:modulerr] Failed to instantiate module app.components due to: Error: [$injector:modulerr] Failed to instantiate module angular-sails due to: Error: [$injector:nomod] Module 'angular-sails' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Can someone tell me what I'm doing wrong ?
Thx

@TheSharpieOne
Copy link
Contributor

See the usage section of the readme, the module name is ngSails

var app = angular.module("MyApp", ['ngSails']);

@redleon00
Copy link
Author

Thax @TheSharpieOne, i fix the mistake, but now the app show me this...
Error: [$injector:unpr] Unknown provider: ngSailsProvider <- ngSails http://errors.angularjs.org/1.5.11/$injector/unpr?p0=ngSailsProvider%20%3C-%20ngSails

i dont know if i have to register the dependence in laravel-angular-admin framework in bower.json file... i have this.

"dependencies": { "jquery": "^2.2.3", "angular": "~1.5.x", "angular-ui-router": "~0.2.15", "ngstorage": "~0.3.10", "restangular": "~1.5.2", "angular-loading-bar": "~0.9.0", "satellizer": "^0.14.0", "angular-bootstrap": "^1.3.1", "bootstrap": "^3.3.6", "AdminLTE": "admin-lte#^2.3.3", "angular-chart.js": "^0.10.0", "angular-acl": "^0.1.5", "angular-datatables": "^0.5.4", "sweetalert": "^1.1.3", "checklist-model": "^0.9.0", "angular-select2": "^1.5.2", "angular-sails": "1.1.4" },

did you see some mistake?

@TheSharpieOne
Copy link
Contributor

It's $sails not ngSails

@redleon00
Copy link
Author

Dont worry...i solve the mistake...in component controller the provider like this
constructor($scope, $state, $log, $compile, DTOptionsBuilder, DTColumnBuilder, API, $stateParams, $uibModal, $http, $sails){ 'ngInject';

Call the provider $sails.

@redleon00
Copy link
Author

yes...you rigth men...thax u!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants