本文介绍了材料设计精简版集成了AngularJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这有助于实现材料设计规范的角度单页应用的。

I am aware of Angular Material which helps implement Material Design specification for use in Angular single-page applications.

我不过考虑一下替代我的角度项目集成。我会想知道去了解与和AngularJS应用集成材料设计精简版的最佳方式。

I'm however taking a look at Material Design Lite alternative to integrate with my Angular project. I will like to know the best way to go about integrating Material Design Lite with and AngularJS app.

推荐答案

Emjay的第二个答案为我工作。您可以通过扔 upgradeAllRegistered 方法转变为角的还减少样板运行块:

Emjay's second answer worked for me. You can additionally reduce boilerplate by tossing the upgradeAllRegistered method into Angular's run block:

angular.module('app', [])
    .run(function ($rootScope,$timeout) {
        $rootScope.$on('$viewContentLoaded', ()=> {
          $timeout(() => {
            componentHandler.upgradeAllRegistered();
          })
        })
      });

这篇关于材料设计精简版集成了AngularJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 20:42