Category : angular-promise

I have been struggling with a nested if-else which I would like to run all the conditions without returning, here’s my code : openMainModal: boolean; openSecondaryModal: boolean; mainFunction(isOpen : boolean) { isOpen ? this.openSecondaryModal = true : this.openMainModal = true; this.OpenModal(): } OpenModal() { call to angular service… if (condition one = true) { do ..

Read more

I have an Angular app which has only one TS file and one html View. I was given a synchronous function CreateData(int categoryCount, int SubCategoryCount) that has couple of for loops in it which will take category count and sub category count as inputs. Each category will get generated with multiple sub categories (generated data ..

Read more

When i debug via Chrom dev tools, data object is having the value for redirecturl but when i assigned the promise value to the controller it says "undefined". what i am doing wrong here? this.dataService.redirectMethod().then(data =>{ let self = this; this.redirectPage= data.redirectUrl; $log.info( ‘Received: ‘, data ); if (data.message) { this.$state.go( ‘error’, { "data": data.message ..

Read more