如何将Web视图添加到Appgyver中的视图

时间:2015-03-22 22:24:47

标签: javascript angularjs steroids

我创建了一个Controller,我打算在WebView中加载一个网站。

控制器:

angular
  .module('example')
  .controller('IndexController', function($scope, supersonic) {
      $scope.navbarTitle = "Index";
      alert("Starting");      
  });

查看:

<div class="padding" ng-controller="IndexController">
    <super-navbar>
        <super-navbar-title>
            Hello!
        </super-navbar-title>
    </super-navbar>
    <super-navigate view-id="using-the-scanner">
        <button class="button button-block button-positive icon-left super-wand">Using the AppGyver Scanner</button>
    </super-navigate>
    <super-navigate view-id="learn-more">
        <button class="button button-block button-positive icon-left super-university">Learn more</button>
    </super-navigate>    
</div>

我只找到了JS代码:

var googleLayer = new steroids.views.WebView("http://www.google.com");

如何将其添加到视图?

1 个答案:

答案 0 :(得分:1)

当你准备好然后打电话 steroids.layers.push(googleLayer);