Create a menu like in AngularJs Material website

后端 未结 7 2002
有刺的猬
有刺的猬 2020-12-23 20:25

I want to create a menu that looks like the one in AngularJs Material website (https://material.angularjs.org)

\

相关标签:
7条回答
  • 2020-12-23 21:00

    As @Splaktar says, you can wait for the official mdListiItem in milestone 0.9.0.

    And you can also checkout the whole angular-material project source code and look into here https://github.com/angular/material#building or README.md to build the docs.

    First install or update your local project's npm tools:

    # First install all the NPM tools:
    npm install
    # Or update
    npm update
    

    Then run the gulp tasks:

    # To build `angular-material.js/.css` and `Theme` files in the `/dist` directory
    gulp build
    # To build the Angular Material Docs and Demos in `/dist/docs` directory
    gulp docs
    

    Then you should see the codes you need in 'docs.js', 'css/docs.css' and 'index.html' in the output folder 'dist/docs'.

    The 'docs.js' in 'dist/docs' is different from the 'docs.js' in the origin 'docs' folder. Many codes are generated and concated together when you build the docs including those you need.

    After you build the docs, the fastest way to get the codes you need is to search 'menuToggle' or 'menuLink' directive or 'menu' factory in 'dist/docs/docs.js'.

    Hope this can help you.

    0 讨论(0)
提交回复
热议问题