Angularjs TypeScript不懂“什么意思?”$位置。$$path";?

Angularjs TypeScript不懂“什么意思?”$位置。$$path";?,angularjs,typescript,Angularjs,Typescript,Typescript为什么不理解$位置。$$path 这是我的控制器的一个片段: static $inject: string[] = ["DataService", "$location", "$route", "$routeParams", "$log"]; constructor( private dataService: DataService, private $location: ng.ILocationService,

Typescript为什么不理解$位置。$$path

这是我的控制器的一个片段:

    static $inject: string[] = ["DataService", "$location", "$route", "$routeParams", "$log"];

    constructor(
        private dataService: DataService,
        private $location: ng.ILocationService,
        private $route: ng.route.IRouteService,
        private $routeParams: IRouteParams,
        private $log: ng.ILogService) {

        if ($location.$$path.includes("Reports")){

        }
    }

是的。
$$
属性是私有的内部属性,不供开发人员使用。您只需执行
$locaton['$$path']['includes']('Reports')
谢谢!那就行了!!