如何使用cometd cometProvider?
How to use cometd cometProvider?
我正在尝试在我的网络应用程序中使用 cometd ,但我遇到了以下异常
未知提供者:cometdProvider <- cometd <- 聊天?
我添加了
<script src="bower_components/angular-cometd/angular-cometd.js"></script>
<script src="bower_components/angular-cometd/angular-cometd-reload.js"></script>
<script src="bower_components/cometd/cometd.js"></script>
<script src="bower_components/cometd/ReloadExtension.js"></script>
我的 JS 文件
app.controller('chat', ['$scope', '$timeout', '$http','cometd', function($scope, $timeout, $http,cometd)
<dependency>
<groupId>org.cometd.javascript</groupId>
<artifactId>cometd-javascript-angular</artifactId>
<version>3.1.1</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-oort</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-websocket-javax-server</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.22</version>
<scope>runtime</scope>
</dependency>
请告诉我如何解决?
我觉得你用的不是官方的CometD code,因为官方的CometD没有provider的概念
请阅读 official documentation 以开始使用 CometD。
我正在尝试在我的网络应用程序中使用 cometd ,但我遇到了以下异常 未知提供者:cometdProvider <- cometd <- 聊天? 我添加了
<script src="bower_components/angular-cometd/angular-cometd.js"></script>
<script src="bower_components/angular-cometd/angular-cometd-reload.js"></script>
<script src="bower_components/cometd/cometd.js"></script>
<script src="bower_components/cometd/ReloadExtension.js"></script>
app.controller('chat', ['$scope', '$timeout', '$http','cometd', function($scope, $timeout, $http,cometd)
<dependency>
<groupId>org.cometd.javascript</groupId>
<artifactId>cometd-javascript-angular</artifactId>
<version>3.1.1</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-oort</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-websocket-javax-server</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.22</version>
<scope>runtime</scope>
</dependency>
请告诉我如何解决?
我觉得你用的不是官方的CometD code,因为官方的CometD没有provider的概念
请阅读 official documentation 以开始使用 CometD。