angularjs - Uncaught Error: No module: firebaseSimpleLogin -
when open website, nil shows except in console, says "uncaught error: no module: firebasesimplelogin". without $firebasesimplelogin , login/signup functions, website works firebase.
i using angularjs , have added $firebasesimplelogin dependency in module/controller. here module:
angular.module('flavor', ['flavorservices', 'firebase', 'firebasesimplelogin']) .config(flavorrouter); function flavorrouter ($routeprovider) { $routeprovider .when('/', { templateurl: 'partials/the_part_using_login.html', controller: 'the_part_using_login_ctrl'}); }
here controller partial html:
function the_part_using_login_ctrl ($scope, $firebase, $firebasesimplelogin) { var userauthref = new firebase("https://thenameofmyapp.firebaseio.com/userauth"); var loginobj = $firebasesimplelogin(userauthref); $scope.user = loginobj.user; $scope.userlogin = function(){ //login part here }; $scope.usersignup = function(){ //signup part here }; }
i have included these files in index.html in next order. not sure if order right:
<script src="https://cdn.firebase.com/js/client/1.1.3/firebase.js"></script> <script type="text/javascript" src="js/lib/angular.min.js"></script> <script src='https://cdn.firebase.com/libs/angularfire/0.8.0/angularfire.js'></script> <script type="text/javascript" src="js/lib/angular-resource.min.js"></script> <script src="https://cdn.firebase.com/v0/firebase-auth-client.js"></script> <script src='https://cdn.firebase.com/js/simple-login/1.6.2/firebase-simple-login.js'></script> <!--other partial files , controller files-->
another thing mention is, using nodejs server. utilize server deal special files don't want set on firebase hosting. not sure if nodejs interfering $firebasesimplelogin.
in dependencies have [..., 'firebase', 'firebasesimplelogin']
, there no module named firebasesimplelogin. it's simple error message indicates.
checking out quickstart angularfire, not list additional dependencies when adding authentication. simple remove extraneous dependency , should go.
for background, module , service separate concepts. module can contain several services. angularfire module called firebase
, contains $firebase
, $firebasesimplelogin
, $firebasearray
, , $firebaseobject
service factories.
also note $firebasesimplelogin
go away, , replaced $firebaseuser
in 0.9 release due out next week.
angularjs node.js firebase firebasesimplelogin
No comments:
Post a Comment