Visual Studio 2015 Angular Intellisense (Angular M

2019-08-12 08:29发布

问题:

I am trying to get Intellisense for VS 2015 for Angular Material Design using the NuGet Package Console.

Install-Package AngularJS.Intellisense

I get the following error:

Install-Package : Unable to find a version of 'AngularJS.Core' that is compatible with 'angular-material 0.8.3 constraint: AngularJS.Core (≥ 1.3.8)', 'AngularJS.Animate 1.3.8 constraint: AngularJS.Core (≥ 1.3.8)', 'AngularJS.Aria 1.3.8 constraint: AngularJS.Core (≥ 1.3.8)', 'AngularJS.Intellisense 1.0.3 constraint: AngularJS.Core (≥ 1.3.0 && < 1.4.0)', 'AngularJS.Route 1.4.3 constraint: AngularJS.Core (≥ 1.4.3)'.At line:1 char:1+ Install-Package AngularJS.Intellisense+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Any suggestions?

回答1:

You need to install AngularJS core first. Because angular-material dependence on AngularJS core : AngularJS.Core (>= 1.3.0 && < 1.4.0).

Install-Package AngularJS.Core -Version x.x.x (>= 1.3.0 && < 1.4.0)

https://www.nuget.org/packages/AngularJS.Intellisense/

And angular material design 0.8.3 in stop supported or maintained so you need to install Angular Material 1.0.9

Install-Package Angular.Material

https://www.nuget.org/packages/Angular.Material/