diff --git a/example/iframe/bundle.json b/example/iframe/bundle.json new file mode 100644 index 0000000000..3b4d658146 --- /dev/null +++ b/example/iframe/bundle.json @@ -0,0 +1,33 @@ +{ + "extensions": { + "types": [ + { + "key": "example.page", + "name": "Page", + "features": [ "creation" ], + "properties": [ + { + "key": "url", + "name": "URL", + "control": "textfield" + } + ] + } + ], + "views": [ + { + "templateUrl": "iframe.html", + "name": "Page", + "type": "example.page", + "key": "example.page" + } + ], + "controllers": [ + { + "key": "IFrameController", + "implementation": "IFrameController.js", + "depends": ["$sce"] + } + ] + } +} \ No newline at end of file diff --git a/example/iframe/res/iframe.html b/example/iframe/res/iframe.html new file mode 100644 index 0000000000..ee2d985948 --- /dev/null +++ b/example/iframe/res/iframe.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/example/iframe/src/IFrameController.js b/example/iframe/src/IFrameController.js new file mode 100644 index 0000000000..94f78d47e7 --- /dev/null +++ b/example/iframe/src/IFrameController.js @@ -0,0 +1,19 @@ +/*global define*/ + +define( + [], + function () { + "use strict"; + + function Controller($sce) { + return { + trust: function (url) { + return $sce.trustAsResourceUrl(url); + } + }; + } + + return Controller; + } + +); \ No newline at end of file