This solution to experience and fresher "If you did not select routing option on the project make time so how can add. "
The solution are as below :- Run below command.
ng generate module app-routing --flat --module=app
Thank you !
This solution to experience and fresher "If you did not select routing option on the project make time so how can add. "
The solution are as below :- Run below command.
ng generate module app-routing --flat --module=app
Thank you !
First you need to open your command line, and use " npm install -g npm@latest or npm install " you'll get the error like this
C:\Users\yourname>npm install -g npm@latest
npm WARN npm npm does not support Node.js v14.7.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function npm ERR! A complete log of this
run can be found in: npm ERR!
C:\Users\BOMWALMIKIA\AppData\Roaming\npm-cache\_logs\2020-08 10T09_36_56_388Z-debug.log
Solution
- Go to the path where you can find the debug log (this file is found in your npm-cache folder) C:\Users\yourname\AppData\Roaming
- Delete the NPM and NPM-Cache folder, but DO NOT reinstall node. Once deleted go back to your command line and re-use the command " npm install -g npm@latest "
So as we all are learning, chrome is blocking entirely https sites, even those from localhosts. Sometimes you a presented with a warning screen. Sometimes you are presented with a connect to network screen despite being fully connected to the internet.
For those of us with application specific programs that do not require a certificate, maybe a self hosted test website or whatever you need. Chrome does allow you to override the warning about https certificates if the address is localhost.
The following error is thrown by the ASP.Net WCF Service when the aspNetCompatibilityEnabled attribute is set to true in Web.Config file.
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the Web.Config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.
If you want to clone you code from DevOps using the ,cmd so steps are as below :-
Step 1:- Go to your branch and copy the clone Path(HTTPS or SSH).Use
Step 2:- Go CMD and open your path where you want to clone your code.
Ste 3 :- Use this command git clone <Step 1 Path>.
The full commands are as below
Thank you Hope it is help you.
If you want to Downgrade/Upgrade you angular version then you have follow the below steps.
Step 1:- npm uninstall -g @angular/cli
Step 2:- npm cache clean --force
Step 3:- Specify which version you want to install
npm install -g @angular/cli@x.x.x(For search list of version pls click here)
This will get the latest cli version: npm install -g @angular/cli
Thank you!
When you getting error "Node Sass version 6.0.1 is incompatible with ^4.0.0. angular" .The solution are as below:-
Step 1:- npm uninstall node-sass
Step 2:- npm install node-sass@4.14.1
I thing it will help you.
Thank you
if you are getting Port 4200 is already in use. Use '--port' to specify a different port the use below command.
ng serve --open --port 4201.
Thank you.
When you have issue in googlemaps in angular the solution are as below :-
run the command npm i @types/googlemaps@3.38.0
Thank you !
If you I got an error node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected solution is as below
You need to do some changes in package.json.
Go to package.json
and modify "rxjs": "^6.0.0"
to "rxjs": "6.0.0"
Then run npm update
in your project.
Thank you ,
Hello Friends
In this artical i will share you "How to get multiple value from dropdown" Hope it will help you.
The sample code are as below:-
If you need to change settings to save the changes from design then you have follow below steps.
Alternatively known as acute, backtick, left quote, or an open quote, the back quote or backquote is a punctuation mark (`). It's on the same U.S. computer keyboard key as the tilde.
Below is an overview of a computer keyboard with the back quote key highlighted in blue.
To create a back quote using a U.S. keyboard, press the `, which is located directly below the Esc key. This key is also used for typing the tilde ( ~ ) character if the Shift key is held while it is pressed.
To create a back quote on a smartphone or tablet locate the single quote in the numbers (123) or symbols (sym) section, and tap and hold the ' symbol. As you continue to hold down on the ' symbol, a menu containing the back quote appears. Drag your finger up to the back quote and let go to insert the symbol.
Thank you.
Alternatively referred to as the squiggly or twiddle, the tilde is a character ( ~ ) on keyboards below the Esc (escape key). It is on the same key as the back quote that resembles a squiggly line. The graphic gives a representation of how the tilde character may appear when typed.
Below is an overview of a computer keyboard with the tilde key highlighted in blue.
To create the tilde symbol using a U.S. keyboard hold down Shift and press ~. This symbol is on the same key as back quote ( ` ), in the top-left portion of the keyboard under Esc.
To create a tilde on a smartphone or tablet's on-screen keyboard, tap the numbers button (123), then the symbols button (#+=). Then, tap the tilde (~) button.
Thank you.
If you are getting this error:
Unable to connect to the remote server at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync
Error:
Full error is as below, while generating reports in Developer VM.
Unable to connect to the remote server at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Table.CloudTable.Exists(Boolean primaryOnly, TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists(TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.DynamicsOnline.Infrastructure.Components.TableAccessor.TableStorageAccessor.PerformOperation(CloudStorageAccount storageAccount, String tableName, Func`1 operation) at
Reason:
Azure emulator service is not running due to port conflict with another windows service.
How to find what is running on what port?
using any of the below commands in cmd will give you list of the ports used by services.
netstat -bano
netstat -a
In my case, those ports were in use by windows application, which i can not stop or change port.
How to solve error?
To resolve this error open CMD with Administrative privileges
Navigate to location: "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\"
Execute command AzureStorageEmulator.exe start.
In my case service was not started due to same ports were being used by another application.
I have changed port number for Azure Emulator to run on different port and started service.
Below is Picturization for the same.
Thank you .
<appSettings>
<add key="StorageAccountName" value="YOURAZURECHINAACCOUNTNAME" />
<add key="StorageAccountKey" value="YOURAZURECHINAACCOUNTKEY" />
</appSettings>
The below is controller code
I am using service here the code are as below:-
using Microsoft.Azure;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
namespace BlobStorageDemo
{
public class ImageService
{
public async Task<string> UploadImageAsync(HttpPostedFileBase imageToUpload)
{
string account = CloudConfigurationManager.GetSetting("StorageAccountName");
string key = CloudConfigurationManager.GetSetting("StorageAccountKey");
string imageFullPath = null;
if (imageToUpload == null || imageToUpload.ContentLength==0)
{
return null;
}
try
{
StorageCredentials credn = new StorageCredentials(account, key);
CloudStorageAccount cloudStorageAccount = new CloudStorageAccount(credn, new Uri("https://deice2staging.blob.core.chinacloudapi.cn "),
new Uri(" https://deice2staging.blob.core.chinacloudapi.cn/ "),
new Uri("https://deice2staging.blob.core.chinacloudapi.cn/ "), null);
//CloudStorageAccount cloudStorageAccount = ConnectionString.GetConnectionString();
CloudBlobClient cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();
CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference("blobstor1");
if(await cloudBlobContainer.CreateIfNotExistsAsync())
{
await cloudBlobContainer.SetPermissionsAsync(
new BlobContainerPermissions {
PublicAccess = BlobContainerPublicAccessType.Blob
}
);
}
string imageName = Guid.NewGuid().ToString() + "-" + Path.GetExtension(imageToUpload.FileName);
CloudBlockBlob cloudBlockBlob = cloudBlobContainer.GetBlockBlobReference(imageName);
cloudBlockBlob.Properties.ContentType = imageToUpload.ContentType;
await cloudBlockBlob.UploadFromStreamAsync(imageToUpload.InputStream);
imageFullPath = cloudBlockBlob.Uri.ToString();
}
catch (Exception ex)
{
}
return imageFullPath;
}
}
}
and my UI code are as below :-
@{
ViewBag.Title = "Upload";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Upload Image</h2>
<br />
@using (Html.BeginForm("Upload", "Image", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<fieldset class="form-horizontal">
<div class="form-group">
<label class="control-label col-md-2" for="Photo">Photo</label>
<div class="col-md-10">
<input type="file" name="photo" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Submit" class="btn" />
</div>
</div>
</fieldset>
}
Thank you .
Hope it is help you