最近、AngularJS と Lumx を使い始めました。サイトの「通知」タブの下にある通知を追加しようとしました。リンクはこちら.
とにかく、私が得るエラーは
「エラー: LxNotificationService が定義されていません」
そのため、コントローラーのサービスのリストに追加します。
以下は私のapp.jsファイルです
var testing = angular.module('testing', []);
testing.controller('mainCtrl', function ($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ページのすべてが正常に機能しています。サービスを正しく呼び出していないだけだと思います。誰でも助けてもらえますか?
PS
以下は、すべてのスクリプト ファイルのリストです。
<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>
前もってありがとう、ナイル