Comments (8)
What errors are you seeing in the browser's console?
from angular-wamp.
I have no eror message in browser's console.
All content of my console:
"session not open" angular.min.js:102
"Congrats! You're connected to the WAMP server!" angular.min.js:102
"We are connected to the WAMP Router!"
from angular-wamp.
Not much to go on there. Can you set a break point on that subscribe and then step through it. Angular doesn't display some exceptions when they're caught. If that doesn't give you anything, can you create a plunkr that reproduces the issue?
from angular-wamp.
I have a conflict between angular-wamp and http.get. I must inverted http.
my all code is:
var app = angular.module('myCart', ['vxWamp']);
app.config(function($wampProvider){
$wampProvider.init({
url: "ws://127.0.0.1:8080/ws",
realm: "realm1"
});
});
app.controller('courseCtrl', function($scope, $http, $wamp){
$scope.id_list = window.location.pathname.split('/');
$scope.id_list = $scope.id_list[$scope.id_list.length-1];
/* Request to REST api */
$http.get('/api/extended_list/1').success(function(data){
$scope.bought = data.achats;
}).
error(function(data){
console.log(data);
});
$http.get('/api/products/').success(function(data){
$scope.items = data.products;
}).
error(function(data){
console.log(data);
});
/* Wamp */
//Executed at connection to wamp server
$scope.$on("$wamp.open", function (event, session) {
console.log('We are connected to the WAMP Router!');
});
//Executed after loose or close connection with wamp server
$scope.$on("$wamp.close", function (event, data) {
$scope.reason = data.reason;
$scope.details = data.details;
});
function refreshList(args) {
console.log('toto');
}
$wamp.subscribe('refresh_add_product', refreshList);
/* Action */
$scope.addToCart = function(id){
$wamp.call('me.hory.add_to_list', [id, $scope.id_list]).then(
function(res){
console.log('product added to list');
},
function(error){
console.log('impossible to add product in list');
}
);
}
$scope.removeToCart = function(id){
$wamp.call('me.hory.remove_to_list', [id, $scope.id_list]).then(
function(res){
console.log('product removed to list');
},
function(error){
console.log('impossible to remove product in list');
}
);
}
});
app.run(function($wamp){
$wamp.open();
})
from angular-wamp.
@yabb85 Are you saying that you had a conflict between angular-wamp and $http.get, but it's fixed now? Or are you still having issues?
from angular-wamp.
I don't understand.
If i use a break point this code is ok.
But without break point the page is not correctly displayed and i don't have an error in console.
from angular-wamp.
It sounds like you might have some sort of race condition. Can you recreate the issue with a plunker?
from angular-wamp.
Hi,
I have created a plunk at address: http://plnkr.co/edit/ChQKyoWkHdc1I2PFXw5o?p=linter
But with this plunker I have no issue.
The problem is my version of file autobahn.min.js
Thanks for help
from angular-wamp.
Related Issues (20)
- Publish latest 0.1.7 to npm HOT 2
- Any thoughts on Angular 2? HOT 13
- Set realm from variable HOT 2
- Session not open error on re connection
- subscribeOnScope promise does not return subscription HOT 2
- Error: [$rootScope:inprog] when subscribing to two Topics HOT 2
- Multiple connections, returned functions use options from last connection
- Unsubscribe gives error HOT 2
- Bower mismatch HOT 1
- connection alternatives HOT 3
- Version on npm is outdated HOT 1
- Working Example HOT 1
- is it possible to use angular-wamp with gos web socket bundle.? HOT 1
- Unable to subscribe from a topic. HOT 1
- Reconnect after connection lost HOT 5
- error callback on subscribe failure is not getting called. HOT 6
- Update dependencies HOT 1
- Cannot uglify on Gulp HOT 1
- problem angular-wamp in angular4 HOT 2
- Establishing a tunnel via proxy server failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-wamp.