Title: CSP in chrome app with angular 2 · Issue #5956 · angular/angular · GitHub
Open Graph Title: CSP in chrome app with angular 2 · Issue #5956 · angular/angular
X Title: CSP in chrome app with angular 2 · Issue #5956 · angular/angular
Description: i have rewrite the example given on angular.io and after building the project and launch it as a chrome app i have some trouble with csp... here is my pubspec.yaml name: angula2_example version: 0.0.1 environment: sdk: '>=1.0.0 <2.0.0' d...
Open Graph Description: i have rewrite the example given on angular.io and after building the project and launch it as a chrome app i have some trouble with csp... here is my pubspec.yaml name: angula2_example version: 0....
X Description: i have rewrite the example given on angular.io and after building the project and launch it as a chrome app i have some trouble with csp... here is my pubspec.yaml name: angula2_example version: 0....
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/angular/angular/issues/5956
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CSP in chrome app with angular 2","articleBody":"i have rewrite the example given on angular.io and after building the project and launch it as a chrome app i have some trouble with csp...\n\nhere is my pubspec.yaml\n\n``` yaml\nname: angula2_example\nversion: 0.0.1\n\nenvironment:\n sdk: '>=1.0.0 \u003c2.0.0'\n\ndependencies:\n angular2: 2.0.0-beta.0\n browser: ^0.10.0\n chrome: 0.8.0\n dart_to_js_script_rewriter: ^0.1.0\n\ntransformers:\n- angular2:\n entry_points: web/main.dart\n- dart_to_js_script_rewriter\n- chrome\n- $dart2js:\n csp: true\n```\n\nmy manifest.json :\n\n``` json\n{\n \"name\": \"Angular2 example\",\n \"version\": \"1\",\n\n \"manifest_version\": 2,\n \"minimum_chrome_version\": \"31\",\n\n \"icons\": {\"128\": \"dart_icon.png\"},\n\n \"app\": {\n \"background\": {\n \"scripts\": [\"background.dart.js\"]\n }\n }\n}\n```\n\nmy index.html :\n\n``` html\n\u003c!DOCTYPE html>\n\u003chtml>\n \u003chead>\n \u003ctitle>Angular2 example in chrome app\u003c/title>\n \u003cscript src=\"main.dart\" type=\"application/dart\">\u003c/script>\n \u003cscript src=\"packages/browser/dart.js\">\u003c/script>\n \u003c/head>\n \u003cbody>\n \u003cmy-app>Loading...\u003c/my-app>\n \u003c/body>\n\u003c/html>\n```\n\nmy main.dart :\n\n``` dart\nimport 'package:angular2/angular2.dart';\nimport 'package:angular2/bootstrap.dart';\n\n@Component(selector: 'my-app')\n@View(template: '\u003ch1>Angular 2\u003c/h1>')\nclass AppComponent {}\n\nmain() {\n bootstrap(AppComponent);\n}\n```\n\nand my background.dart :\n\n``` dart\nimport \"package:chrome/chrome_app.dart\" as chrome;\n\nmain() {\n chrome.app.runtime.onLaunched.listen((data) {\n chrome.CreateWindowOptions createWindowOptions =\n new chrome.CreateWindowOptions();\n createWindowOptions.id = \"_angular2-example\";\n createWindowOptions.bounds =\n new chrome.ContentBounds(width: 800, height: 600);\n chrome.app.window.create(\"index.html\", createWindowOptions);\n });\n}\n```\n\nthe error :\nUncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: \"default-src 'self' blob: filesystem: chrome-extension-resource:\".\n\nThanks\n","author":{"url":"https://github.com/kevin-sakemaer","@type":"Person","name":"kevin-sakemaer"},"datePublished":"2015-12-16T17:31:16Z","url":"https://github.com/angular/angular/issues/5956"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:113092ce-045d-89c7-fd51-a021983e9354 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B69A:3272B6:105CC6C:168C1B5:6B0563E3 |
| html-safe-nonce | 4692246282e2283a9fc0636628e791c2689e91ef0c2870ad94205cf75f010813 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjlBOjMyNzJCNjoxMDVDQzZDOjE2OEMxQjU6NkIwNTYzRTMiLCJ2aXNpdG9yX2lkIjoiODQyNTA4NzI3OTczNDA1NjY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 55e517795920371b7b63e7a3275951b3234ae5cd7694005622a3b4881ce43d52 |
| hovercard-subject-tag | issue:122561083 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/5956/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50dda61b8808fdd03ee6dab96632f4503a67e8eaaff882e5d4b0a5b4641455ac/angular/angular/issues/5956 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50dda61b8808fdd03ee6dab96632f4503a67e8eaaff882e5d4b0a5b4641455ac/angular/angular/issues/5956 |
| og:image:alt | i have rewrite the example given on angular.io and after building the project and launch it as a chrome app i have some trouble with csp... here is my pubspec.yaml name: angula2_example version: 0.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kevin-sakemaer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1be5cc09efdd4833c24a4ffa71d698e3999fa09071e159fe14c2c08e41c98331 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f6d69234e682c947a48074340e69d45d5901de31 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width