Giter VIP home page Giter VIP logo

dynamicaloadmultileveldropdownmenu's Introduction

DynamicaLoadMultiLevelDropDownMenu

Angular 2 (v2.4) dynamically load multi-level drop down menu

How to run? After download, go to the folder and

npm install

npm start

demo :http://plnkr.co/edit/wLqLUoBQYgcDwOgSoRfF?p=preview


After plnkr demo opened, Click "launch preview in a separate windows" button at right top. squeeze edge of screen slowly and we can see menu line up for mobile devices. Now if you drage edge of screen slower to increese size of screen, untill centain time, the screen is large enough and menu will be back as tablet/ipad/desktop screen automatically, release the screen edge. Now, when you put your cursor on level1 -> level2 -> level3 and you can see "my page" is pup up inside the screen(very smart).


Question to angular team, when we can have this kind of smartmenu in ng2, not as jquery plugin?


Ok, Angular2 component router cannot solve my problem. I have hundreds pages on a web site and don't want my users to make lots of clicks on router componet then find, they are not sure where to go, they don't even know which pannel to start with(This is your fault: ng2 componet router! And ng2 team, here is a challenge for you).

Make things worse, business wants to decide which web pages to show after users logon.

Currently, jquery smartmenus (https://github.com/vadikom/smartmenus, http://www.smartmenus.org/) can be helpfull for first part of problem. it is mobile/tablet/ipad user friendly as well. Thanks Smartmenus! My https://github.com/Longfld/DynamicalRouter can solve second part of issue.

Now, our chanllege is to plug in jquery smartmenu into existing ng2 application.

It all starts from https://github.com/Longfld/DynamicaLoadMultiLevelDropDownMenu/blob/master/app/app.component.ts.

Add a Output EventEmitter in MyRouterLink to tell its parent router links have been added. Its parrent componet app.component will call $('#main-menu').smartmenus() after get the message.


Here is smartmenus domo: http://plnkr.co/edit/GhgAWHv78qerLDcKgKDm?p=preview

dynamicaloadmultileveldropdownmenu's People

Contributors

longfld avatar

Watchers

James Cloos avatar zw avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.