简体   繁体   English

Onsen UI在AngularJS项目中不起作用

[英]Onsen UI not working in AngularJS project

Im trying to use Onsen with AngularJS but when i call the scripts i have error of 404 not found, this are the scripts that arent working 我正在尝试将Onsen与AngularJS结合使用,但是当我调用脚本时却找不到404错误,这是无法正常工作的脚本

<link rel="stylesheet" href="onsenui.css"/>
<link rel="stylesheet" href="onsen-css-components.css"/>
<script src="angular.min.js"></script>
<script src="onsenui.min.js"></script>
<script src="angular-onsenui.min.js"></script>

i have installed onsen ui with npm, and i do have it in the node modules, and i have called it in the module too 我已经用npm安装了onsen ui,并且确实在节点模块中安装了它,并且我也在模块中调用了它

var app = angular.module('app',['ngRoute','app.routes', 'app.core', 
'onsen']);
app.controller('AppCtrl',function(){});

any idea what can i do to make it work? 任何想法我该怎么做才能使其正常工作?

No need to call this via script tag if you already have installed via NPM. 如果您已经通过NPM安装,则无需通过脚本标签调用它。

Take advantage of the module distribution, so you can simply call it with requirejs . 利用模块分发的优势,因此您可以简单地使用requirejs调用。

But there is literally gazillion projects on the web. 但是,网上确实有数以千计的项目。 For example this boilerplate can help you. 例如, 样板可以为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM