I am wondering if it is possible to get “typescript intellisense” in my razor views, as I have in my ts files?
This is my app.ts file (when I type "this". The property "myExampleMessage" appears):
/// <reference path="Scripts/typings/angularjs/angular.d.ts"/> 'use strict'; var app = angular.module('app', []); class TestController { constructor($scope: ng.IScope) { this.myExampleMessage = "Hello"; } myExampleMessage: string; }
This is my default.cshtml file (when I type 'tController.', Intellisense is not displayed):
<!DOCTYPE html> <html lang="en" ng-app="app"> <head> <title>TypeScript HTML App</title> <script src="Scripts/angular.js"></script> <script src="app.js"></script> </head> <body ng-controller="TestController as tController"> <h1>TypeScript HTML App</h1> <div id="content">{{tController.myExampleMessage}}</div> </body> </html>
What I would like for Visual Studio (2013) to understand what tController is and give me the properties defined in this class. In this case, it will be the myExampleMessage property.
Am I doing something wrong or is it impossible?
source share