Я недавно начал работать с AngularJS и Lumx. Я попытался добавить уведомления, которые можно найти в разделе «уведомление» на сайте. Link is here.Служба LxNotificationService не работает в приложении AngularJS
Anywho годов, ошибка я получаю
"Error: LxNotificationService is not defined"
Так что я добавить его в свой список услуг в контроллере.
Ниже мой app.js файл
var testing = angular.module('testing', []);
testing.controller ('mainCtrl', функция ($ SCOPE) {
$scope.notify = function(type)
{
if (type === 'simple')
{
LxNotificationService.notify('Lorem Ipsum');
}
else if (type === 'sticky')
{
LxNotificationService.notify('Lorem Ipsum', undefined, true);
}
else if (type === 'icon')
{
LxNotificationService.notify('Lorem Ipsum', 'android');
}
else if (type === 'color')
{
LxNotificationService.notify('Lorem Ipsum', undefined, false, 'grey');
}
else if (type === 'info')
{
LxNotificationService.info('Lorem Ipsum');
}
else if (type === 'success')
{
LxNotificationService.success('Lorem Ipsum');
}
else if (type === 'warning')
{
LxNotificationService.warning('Lorem Ipsum');
}
else if (type === 'error')
{
LxNotificationService.error('Lorem Ipsum');
}
};
});
Все на странице html работает нормально, я полагаю, что я просто не позвоню службе правильно. Может ли кто-нибудь помочь, пожалуйста?
P.S.
Ниже приведен список всех файлов сценариев.
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/velocity/velocity.js"></script>
<script src="bower_components/moment/min/moment-with-locales.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/lumx/dist/lumx.min.js"></script>
<script src="app.js"></script>
Спасибо заранее, Найл