Angular UI Select2 reset error in console when used in chrome App
I am trying to use the following select2 example in a chrome app using AngularJS and Angular-UI . It works great, but unfortunately I get the following error in the Chrome console every time you click on the drop box.
"Refused to execute inline event handler because it violates the following content security policy directive:" default-src "self" chrome-extension-resource: ". Note that 'script -src' was not explicitly set, so 'default - src 'is used as a fallback. "
Any suggestion how I can fix this problem?
thank
* This code works fine without any problem in the browser, but not in Chrome. Code:
controller
var app = angular.module("app", ['ui']);
function Ctrl($scope) {
$scope.contacts = [
{
"id": 1,
"name": "Lucky"},
{
"id": 2,
"name": "Lance"},
{
"id": 3,
"name": "Troels"},
{
"id": 4,
"name": "Phe"}
];
}
View
<select class="input-medium" ui-select2 ng-model="form.cont" type="text" value="" >
<option ng-repeat="contac in all" value="{{contac.id}}">{{contac.name}}</option>
</select>
<h / "> Solved!
Thanks to the advice of @AlanRodriguesSoares. I downloaded another version of select2.js from gitub ([link] https://raw.github.com/timoxley/select2/bug/onclick/select2.js ) where this issue has been fixed.
source to share