离子2:导入角度库

时间:2017-04-14 13:27:56

标签: angular ionic2

我是Ionic和Angular的新手,并且在我的离子应用程序中找到了library我想要使用的内容。我已将.js文件放在/src/assets/angular_slideables.js中并尝试在index.html中链接到该文件,但我收到以下错误:

Runtime Error
angular is not defined

的index.html

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8">
  <title>Ionic App</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
  <link rel="manifest" href="manifest.json">
  <meta name="theme-color" content="#4e8ef7">

  <!-- cordova.js required for cordova apps -->
  <script src="cordova.js"></script>

  <link href="build/main.css" rel="stylesheet">

</head>
<body>

  <!-- Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- The bundle js is generated during the build process -->
  <script src="build/main.js"></script>
  <script src="assets/angular_slideables.js"></script>

</body>
</html>

我的理解是,当我第一次启动应用程序时,角度已经包含在内。我还需要链接到它吗?

0 个答案:

没有答案