Search Posts

Category: typescript

Why is session storage being drawn upon between different browser instances?

how to Why is session storage being drawn upon between different browser instances? Background In an application I’m working on, I’ve found that I can define values in sessionStorage in Chrome 62 on Windows 10, and that apparently changing that value in one tab affects other tabs that point to the same key. I was operating under the assumption that localStorage is supposed to persist information across all browser windows, while sessionStorage is only supposed […]

Async Typescript

how to Async Typescript i’m working on an project, with web service hosted on IIS (C#), and i’m trying to call this WS, but the call isn’t work asynchronous the login.component : async onSubmit() { var value : boolean; if (this.form.valid) { value = await this.authService.login(this.form.value); // {7} } this.formSubmitAttempt = true; // {8} if (value) { this.router.navigate([‘/**’]); } else { console.log(“Wrong login info”); } } } and auth.service async login( user : User):Promise<boolean> { […]

angular 5 recursive template ERROR RangeError: Maximum call stack size exceeded in

how to angular 5 recursive template ERROR RangeError: Maximum call stack size exceeded in hello everyone i am using angular recursive template for recursive representation of array. its code is as below i have been following https://plnkr.co/edit/CIGAA5BmiKU4hCMsOaIB?p=preview this link. my array is basically dynamic <ul> <ng-template #recursiveList let-list> <li *ngFor=”let item of AlldepartmentList; let index = index”> <span (click)=”getDepartment(item.id)”> {{item.department_name}} </span> <ul *ngIf=”item.children.length > 0″> <ng-container *ngTemplateOutlet=”recursiveList; context:{ $implicit: item.children }”></ng-container> </ul> </li> </ng-template> <ng-container […]

Dynamically add CSS stylesheet in runtime using angular and Ionic 2

how to Dynamically add CSS stylesheet in runtime using angular and Ionic 2 I’m trying to develop a dual language app in Ionic2. The languages are English and Arabic. I have two CSS files one is english.css and the other one is arabic.css, when changing from English to Arabic, the english.css should be removed and arabic.css should be added at runtime. Are there any possibilities? Source: AngularJS

Passing data to a function inside an ng-repeat with orderBy

how to Passing data to a function inside an ng-repeat with orderBy I have an issue that I can’t seem to figure out to do with ng-repeat and orderBy. I have searched around as best I could and haven’t found anything specific on this topic. I have an ng-repeat on a tbody and inside that I have two tr tags. The first one just populates each row of the table with each item of the […]

Adding marker to google map in Ionic Application

I’ve been following this helpful tutorial – https://www.joshmorony.com/ionic-2-how-to-use-google-maps-geolocation-video-tutorial/. Everything works great. However, this example prompts the user to add a marker to the google map by clicking on a button. I want the marker to be automatically added after the map loads in the view. However, I’m receiving the error cannot read propery of getCentre of undefined I’m quite sure that is telling me that it is attempting to add the marker before the map […]

Error when loading ngx-restangular: (SystemJS) Module not already loaded loading "@angular/core" as

I’ve upgraded from the AngularJS ‘restangular’ library to the Angular ‘ngx-restangular’ library, as part of an upgrade from AngularJS to Angular. I’m now getting the following error and stack trace and I have no idea why it’s happening: sign-in-redirect Error: (SystemJS) Module not already loaded loading “@angular/core” as http://localhost/node_modules/@angular/core/bundles/core.umd.js. Error: Module not already loaded loading “@angular/core” as http://localhost/node_modules/@angular/core/bundles/core.umd.js. at Object.eval (http://localhost/node_modules/ngx-restangular/dist/umd/ngx-restangular.js:125:19) at __webpack_require__ (http://localhost/node_modules/ngx-restangular/dist/umd/ngx-restangular.js:30:30) at Object.eval (http://localhost/node_modules/ngx-restangular/dist/umd/ngx-restangular.js:86:15) at __webpack_require__ (http://localhost/node_modules/ngx-restangular/dist/umd/ngx-restangular.js:30:30) at Object.eval (http://localhost/node_modules/ngx-restangular/dist/umd/ngx-restangular.js:59:33) at __webpack_require__ […]

RxJs Observables problems

So basically I have an Ionic mobile application. data are retrieved from firebase database using RxJS Observables. I wanted to put a search feature in one of my modules but im having a hard time because of observables retrieving data in real time, my initial logic is to push the retrieved data in an array and that array will be the basis for the search feature. Is there any other way? initializeItems() { this.travelList$ = […]

Next Page »