Search Posts

Category: jhipster

How do i display an image(AWS) in same page in angularjs

I need to display an image in jhipster angularjs application(In same Page). The image is rendered from AWS server- so, i have got only document path. Generally if i give that doc path, it will redirect to chrome to display that image. But, in my case, i need to display in the same screen. How to achieve this in angularjs? Note: Document Path: Source: AngularJS

Getting Access control allow origin error, in jhipster angular project

From jhipster-angular, i am trying to invoke an microservice, which is deployed in different server. When i try to do so, i am getting the below error Failed to load The ‘Access-Control-Allow-Origin’ header contains multiple values ‘http://localhost:8086, http://localhost:8086‘, but only one is allowed. Origin ‘http://localhost:8086‘ is therefore not allowed access. Any idea what has to be done ? Note: i have enabled CORS in and in application.yml (From my angular application) cors: allowed-origins: […]

Browser back button is not working in Springboot project

I created a project that contains some popup.I can close the popup via $uibModalInstance.dismiss(‘cancel’).It is working on all my pages.But When i want to close the popup via browser back button,the popup is not closed.I noticed when i click the browser back button, run function is working. function run(stateHandler,$uidModalStack,$rootScope){ $rootScope.$on(‘stateChangeStart’,function(event){ //to do } } I cannot use $uibModalInstance.dismiss(‘cancel’) or something like that($uidModalStack).Do you have any idea?` Source: AngularJS

Jhipster pagination count issue

I am having issues with pagination in jhipster, the X-Total-Count is not correct, Everytime total-count gets returned is as same as the size that I send to the api, I even tried logging the page.getTotalCount and it also returns the same value as size that I send from frontend, I am not sure what happened to the project, cause everything was working properly before, I am using jhipster 4.1, mongodb is my database and angular […]

JHIPSTER – How can I show a different HOME page in JHipster for each ROLE?

I’m making a JHipster project and I need to show a different home page for each role that I log in with, I’m using Angular 1.x. For example I have the ROLE_ADMINand the ROLE_USERand I need to show a different dashboard for each on. I have read that I can put something like this in the home.controller.js this.eventManager.subscribe(‘authenticationSuccess’, (message) => { this.principal.identity().then((account) => { if (account.authorities.indexOf(“ROLE_ADMIN”) >=0) { this.router.navigate([‘#/pages/prueba/prueba.html’]); } else { this.account = account; […]

Jhipster-generator error on production profile

I’m Trying to run my app in production profile, i’m using jhipster-generator for spring-boot app and angular. The app only run the footer and the background but the rest of the aplication nope, The error Uncaught Error: [$injector:modulerr] Failed to instantiate module myAppdue to: Error: [$injector:nomod] Module ‘myApp’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second […]

Jhispter : angular prints null entity while retrieving objects after 1

angular .module(‘smartLpcApp’) .controller(‘CaptionsDetailController’, CaptionsDetailController); CaptionsDetailController.$inject = [‘$scope’, ‘$rootScope’, ‘$stateParams’, ‘entity’, ‘Captions’, ‘Projects’]; function CaptionsDetailController($scope, $rootScope, $stateParams, entity, Captions, Projects) { var vm = this; vm.captions = entity; console.log(“Printing entity : “+JSON.stringify(entity)); vm.load = function (id) { Captions.get({id: id}, function(result) { vm.captions = result; }); }; var unsubscribe = $rootScope.$on(‘smartLpcApp:captionsUpdate’, function(event, result) { vm.captions = result; }); $scope.$on(‘$destroy’, unsubscribe); } I am using Jhipster 1.8.5 and angular 1.5.2. This controller gets entity and displays it.While retrieving […]