"bound m" show in angular ng-repeat

Issue I use restangular to connect to REST API. I define a ProductService.js with this code: ‘use strict’; angular.module(‘app’).service(‘ProductService’, function($rootScope, Restangular) { // Build collection /product URL var _productService = Restangular.all(‘product’); this.list = function() { // GET /api/product return _productService.getList();

Continue reading

Catching errors in Angular HttpClient

Issue I have a data service that looks like this: @Injectable() export class DataService { baseUrl = ‘http://localhost’ constructor( private httpClient: HttpClient) { } get(url, params): Promise<Object> { return this.sendRequest(this.baseUrl + url, ‘get’, null, params) .map((res) => { return res

Continue reading

I get colon with my param using express for node.js

Issue Here’s my routing : router.route(‘/search:word’).get(function(req, res) { var re = new RegExp(req.params.word, ‘i’); console.log(req.params.word); Place.find().or([{ ‘title’: { $regex: re }}, { ‘category’: { $regex: re }}]).sort(‘title’).exec(function(err, places) { res.json(JSON.stringify(places)); }); }); When I use the request /places/search:test the console

Continue reading

Referencing a schema, not a model

Issue I want to reference to a subdocument which is defined as a schema. Here’s the example: exam.model.js: const answerSchema = new mongoose.Schema({ text: String, isCorrect: Boolean, }); const questionSchema = new mongoose.Schema({ text: String, answers: [answerSchema], }); const examSchema

Continue reading

Trying to send a image as byte[] from Spring backend to Angular frontend but:

Issue The backend code: @GetMapping("datamatrix") public ResponseEntity<byte[]> generarDataMatrix(Long id) throws IOException { byte[] dataMatrixEnBytes = dataMatrix.generarDataMatrixImagen(id.toString(), id); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.IMAGE_JPEG); return new ResponseEntity<>(dataMatrixEnBytes, headers, HttpStatus.OK); } In Postman the response is OK: But in Angular… Angular Code:

Continue reading

Display GET Request data in HTML

Issue This endpoint http://vk-data:8003/v1/entries/ returns this: [ { "id": "country", "url": "http://vk-data:8003/v1/entries/country", "name": "Countries", "description": "All the countries in the world" }, { "id": "data-site", "url": "http://vl-data:8003/v1/entries/data-site", "name": "World data storage", "description": "A catalog of health data" } ] How

Continue reading

docker ERR_NAME_NOT_RESOLVED http ajax

Issue I have 3 simple microservices (mysql, apirest, gui) that I start using docker-compose: version: ‘3.2’ services: mysql: image: mysql/mysql-server:5.6 container_name: mysql restart: always volumes: – mysql:/var/lib/mysql/data ports: – “3306:3306” networks: – mynetwork deploy: mode: replicated replicas: 1 environment: –

Continue reading