javascript - index.html 可以读取 angular.js 1.x 版本中需要的 .js 文件吗?

标签 javascript angularjs

用户有权浏览菜单。

当用户需要menu_1.js文件时 但B用户不需要menu_1.js文件,也不必去那里

我想在 angular.js 版本 1.x 的 index.html 中读取需要的 js 文件。

我可以解决这个问题吗?

谢谢你的回答。

最佳答案

这样的事情可能会有所帮助

<footer ng-if="userA">
<!-- Call the script here -->
</footer>

<footer ng-if="userB">
<!-- Call the script here -->
</footer>

关于javascript - index.html 可以读取 angular.js 1.x 版本中需要的 .js 文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40711952/

相关文章:

使用 indexOf 的 javascript 搜索不适用于 map()

javascript - 使用带有闹钟声音的JavaScript创建倒数计时器

javascript - 正则表达式中的多个条件 - 如何用破折号替换冒号和空格

javascript - jQuery UI 选择菜单 : Why is "select" event not triggered?

javascript - Angular : checkbox on form does not become checked when value from API is returned until I submit the form

javascript - Angular 工厂只返回部分资源响应

javascript - 如何在angular js中更改文件上传名称

angularjs - ASP.NET MVC Razor View 与 AngularJS

javascript - 迁移 Angular 1 应用程序以使用模块加载器时出现加载顺序问题

javascript - 如何在指令之外调用方法?