gpt4 book ai didi

javascript - 将 Materialise 与 Angular 一起使用

转载 作者:行者123 更新时间:2023-11-28 06:40:37 24 4
gpt4 key购买 nike

有人知道如何将 Materializecss.com 与 A​​ngular 和 UI-Router 一起使用吗?要在 ui-view 中添加内容,物化工作将停止(视差、网格系统等)

   <link type="text/css" rel="stylesheet" href="css/materialize.min.css"  media="screen,projection"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script type="text/javascript" src="scripts/libs/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="scripts/libs/materialize.min.js"></script>
<script src="scripts/libs/angular.min.js"></script>
<script src="scripts/libs/angular-route.min.js"></script>
<script src="scripts/libs/angular-ui-router.js"></script>
<script src="scripts/libs/angular-ui-router.min.js"></script>
<script src="scripts/libs/ngStorage.js"></script>
<script src="scripts/controllers/main.js"></script>



var app = angular.module('elementif', [
'ngStorage',
'ngRoute',
'ui.router'
]);

app.config(['$routeProvider', '$httpProvider', '$stateProvider', '$urlRouterProvider', function ($routeProvider, $httpProvider, $stateProvider, $urlRouterProvider) {    
$urlRouterProvider.otherwise("/home");
$stateProvider
.state("home", {
url: "/home",
templateUrl: "pages/home.html",
controller: 'sesionController'
})
.state("myProfile", {
url: "/myProfile",
templateUrl: "pages/myProfile.html",
controller: 'sesionController'
});

}
]);

最佳答案

你应该尝试 Angular-Materialize。

https://github.com/krescruz/angular-materialize

关于javascript - 将 Materialise 与 Angular 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33857513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com