首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用Ionic Deeplink

无法使用Ionic Deeplink
EN

Stack Overflow用户
提问于 2016-08-26 05:44:18
回答 1查看 714关注 0票数 0

我不能让离子深度链接工作。我得到了这个错误。(我安装了https://github.com/driftyco/ionic-native)。

错误:$injector:modulerr无法实例化模块ionic.native,原因是:错误:$injector:nomod模块'ionic.native‘不可用!您要么拼写错误模块名称,要么忘记加载它。如果注册一个模块,请确保将依赖项指定为第二个参数。

代码语言:javascript
复制
    angular.module('starter', ['ionic', 'ionic.native', 'starter.controllers', 'starter.services', 'ngCordova', 'imageCropper','ngStorage'])

  .run(['$ionicPlatform', '$cordovaDeeplinks', '$state', '$timeout', function($ionicPlatform, $cordovaDeeplinks, $state, $timeout) {

    $ionicPlatform.ready(function () {

      if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
        cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        cordova.plugins.Keyboard.disableScroll(true);

      }
      if (window.StatusBar) {
        StatusBar.styleLightContent();
      }

      $cordovaDeeplinks.route({
        '/profile': {
          target: 'tab.profile',
          parent: 'tab-profile'
        }


      }).subscribe(function(match) {

        $timeout(function() {
          $state.go(match.$route.parent, match.$args);

          $timeout(function() {
            $state.go(match.$route.target, match.$args);
          }, 800);
        }, 100); // Timeouts can be tweaked to customize the feel of the deeplink
      }, function(nomatch) {
        console.warn('No match', nomatch);
      });
    });

  }])

  .config(function ($stateProvider, $urlRouterProvider) {
EN

回答 1

Stack Overflow用户

发布于 2016-11-29 08:30:06

您可能需要运行以下命令:

代码语言:javascript
复制
bower install ionic-native --save
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39155187

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档