I have index file <div ng-app="myApp" data-ng-init="init()"> <ng-view></ng-view> </div> script looks like this var app = angular.module(‘myApp’, [‘ngRoute’]) app.config(function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when(‘/home/’, { template: ‘home.html’, controller: ‘homeController’ }) . when(‘/menu/’, { templateUrl: ‘menu.html’, controller: ‘menuController’ }) app.controller(‘homeController’,function($scope,$rootScope){ $scope.init=function(){ alert(‘executing the init function’) } }) app.controller(‘menuController’,function($scope,$location){ if($scope.var1){ $location.path(‘/home/’) } }) the first time ..

Read more

this is my component: my goal is to send latitude and longitude to the back-end! but it doesn’t work correctly! private lat: number; private lng: number; ngOnInit(): void { this.ref = this.makeReceference(); this.getSites(); //map L.Map.addInitHook("addHandler", "gestureHandling", GestureHandling); var map = L.map(‘map’,{minZoom: 7,gestureHandling: true}).setView([36.853995,10.209341],16); L.tileLayer(‘http://{s}.tile.osm.org/{z}/{x}/{y}.png’, { attribution: ‘&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors’}).addTo(map); var drawnItems = new L.FeatureGroup(); ..

Read more

On some websites, I include a contact page where users can upload a specific image along with completing a contact form that will be sent to website merchant. I use cloud firestore along with firebase storage to retrieve that image through the dynamic transactional email template that is sent to the owner of the website. ..

Read more

I want to send a FormData from angular to nestjs. In my angular component : let formData = new FormData(); formData.append(‘studentFile’, file) formData.append(‘studentName’, name) const headers = new HttpHeaders(); headers.set("Accept", "application/json").set(‘Content-Type’, ‘application/json’) this.httpClient.post("http://localhost:3000", formData, { headers }).subscribe(response => { }) When I print formData is not empty. In my nestjs: @Post() create(@Body() model: any) { ..

Read more

I am trying to inject the mat-button via TS in my HTML. The code that is parsed inside innerHTML in col?.cell(element) is below: `<button mat-raised-button color="warn">${Constants.BOOKED}</p>` My HTML is like this: <div [innerHTML]="col?.cell(element)"></div> I have created a SAFE pipe like below: import { Pipe, PipeTransform } from ‘@angular/core’; import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, ..

Read more

I want to change my title on live HTML Code <ng-container *ngFor="let group of formData.groups"> <!– Panels–> <mat-accordion> <mat-expansion-panel cdkDrag> <mat-expansion-panel-header> {{group.formGroupName}} </mat-expansion-panel-header> </mat-accordion> </ng-container> i was try to add input like below so i can modify the text but <input type="text" [(ngModel)]="group.formGroupName" class="editable" /> But this is not working This is my Ts. formData: ..

Read more