title: Chrome Webstore inline installation with AngularJS
body: <p>I'm a newbie with AngularJS and trying to install a Chrome extension following the <a href="https://developer.chrome.com/webstore/inline_installation" rel="nofollow noreferrer">Webstore inline installation guide</a>    </p>
  
  <p>In my .html file</p>
  
  <pre><code>&lt;button data-ng-click="chromeExtensionInstall()" id="install-button"&gt;Add to Chrome&lt;/button&gt;
  </code></pre>
  
  <p>In my .js file</p>
  
  <pre><code>function successCallback () {
      window.alert('success');
  }
  
  function failureCallback () {
      window.alert('failure');
  }
  
  $scope.chromeExtensionInstall = function() {
      if (!chrome.app.isInstalled) {
          chrome.webstore.install('https://chrome.google.com/webstore/detail/...',
              successCallback(), failureCallback());
      }
  };
  </code></pre>
  
  <p>Both alerts are displayed and then getting this Uncaught Exception: "Chrome Web Store installations can only be initiated by a user gesture"</p>
  
  <p>Any idea? </p>