AngularJS $httpProvider undefined

后端 未结 2 1992
北荒
北荒 2021-01-12 03:58

I\'am trying to use a basic sample of interceptors, so I stared with a little piece of code but without success:

var app = angular.module(\'app\',[]).
  con         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 04:18

    Your code is perfect. You need to make sure you are using the correct version of angularjs. The $http.interceptors array was added in version 1.1.4.

    I made a plunker with your example working with angular 1.1.4, check it out here http://plnkr.co/edit/cuPfat?p=preview

提交回复
热议问题