Mohammed Nasrullah
Mohammed Nasrullah

Reputation: 433

Angular $cookieStore for Ionic framework

im creating a add to cart application with the use of ionicframework with angular. im trying to use the angular ngCookies in my controller

My application doesn't load when i add the ngCookies in my controller in this way

angular.module('starter.controllers', ['ngCookies'])

But my application works when i dont include ngCookies in this way

 angular.module('starter.controllers', [])

and i also have included the <script src="js/angular-cookies.js"></script> in my ionic index.html page

I dont know if im missing anything anywhere

Upvotes: 1

Views: 1071

Answers (1)

LeftyX
LeftyX

Reputation: 35587

I guess you have a main module for the app. Something like this:

angular.module('starter', ['ionic', 'starter.controllers'])

try to inject the reference there:

angular.module('starter', ['ionic', 'ngCookies', 'starter.controllers'])

and leave your controller module as it was before:

angular.module('starter.controllers', [])

always check what kind of error messages in chrome (console).

Upvotes: 1

Related Questions