0

I have been implementing a modal popup in my project and i need to open some external url link like a popup in my angular JS project. For that i have been trying to implement the uibmodal of angular JS and facing with the below issue.

Error code: Blocked loading resource from url not allowed by $sceDelegate policy.

Uncaught Exception: Uncaught Error: [$sce:insecurl] http://errors.angularjs.org/1.4.8/$sce/insecurl?p0=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F%23inbox

$uibModal.open({
                                     templateUrl: 'https://mail.google.com/mail/u/0/#inbox',                                   
                                     keyboard: false, // ESC key close enable/disable
                                     resolve: {
                                         actualData: function () {
                                             return true;
                                         }
                                     } // data passed to the controller
                                 }).result.then(function (data) {
                                     //do logic
                                 }, function () {
                                     alert("page closed")
                                     // action on popup dismissal.
                                 });
James Z
  • 12,104
  • 10
  • 27
  • 43
  • @Kinglish u r saying i need to specify like this `angular.module('myApp', []).config(function($sceDelegateProvider) { $sceDelegateProvider.resourceUrlWhitelist([ // Allow same origin resource loads. 'self', // Allow loading from our assets domain. **. 'https://mail.google.com/mail/u/0/#inbox' ]);` – sanjay ram Mar 03 '22 at 18:48

0 Answers0