Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't work #42

Open
liuhao2050 opened this issue Aug 9, 2016 · 1 comment
Open

It doesn't work #42

liuhao2050 opened this issue Aug 9, 2016 · 1 comment

Comments

@liuhao2050
Copy link

the steps I do:
1.

 <link rel="stylesheet" href="/css/liveadmin/lib/angular-material.css" />
  <link rel="stylesheet" href="/css/liveadmin/lib/angular-material-sidenav.css>
<script src="angular/angular.min.js"></script>
<script src="/angular/angular-material.min.js"></script>
<script src="angular/angular-animate.min.js"></script>
<script src="angular/angular-ui-router.min.js"></script>
<script src="angular/angular-touch.min.js"></script>
<script src="angular/angular-material-sidenav.js"></script>
<script src="js/app.js"></script>

app.js:

`app = angular.module "guildApp",
    ['ui.router',
     'sasrio.angular-material-sidenav'
    ]
app.config (ssSideNavSectionsProvider)->
    ssSideNavSectionsProvider.initWithSections([{
        id:     'toogle_1',
        name:   'Section Heading 1',
        type:   'heading',
        children: [{
            name:   'Toogle 1',
            type:   'toggle',
            pages:  [{
                id:     'toggle_item_1',
                name:   'item 1',
                state:  'common.toggle.item1'
            }, {
                id:     'toggle_item_2',
                name:   'item 2',
                state:  'common.toggle.item2'
            }]
        }]
        }, {
            id:         'link_1',
            name:       'Simple link to Index state',
            state:      'common.index',
            type:       'link',
            hidden: true
        }]);
app.controller "indexCtrl", ($scope, $timeout, ssSideNav)->
    $scope.hello = "hello wrold"
    ($timeout, ssSideNav)->
        $scope.menu = ssSideNav;
        ssSideNav.setVisible('link_1');
        ssSideNav.setVisibleFor([{
          id: 'toggle_item_1',
          value: true
        }, {
          id: 'link_1',
          value: false
        }]);
        $timeout( ->
            ssSideNav.setVisible('toogle_2', false);
        )

        $timeout(
            ->
                ssSideNav.forceSelectionWithId('toogle_1_link_2')
            , 1000 * 3);

  1. html
<div ng-app="guildApp">
          <div ui-view layout="row" flex></div>
        <ss-sidenav menu="menu"></ss-sidenav>
        <div ng-controller="indexCtrl">
            {{hello}}
            <ss-sidenav menu="menu"></ss-sidenav>

        </div>

    </div>

but it doesn't work.....

@sovanna
Copy link
Owner

sovanna commented Aug 25, 2016

I think it depends on the version of angular.
When I've made the component, I target some version of angular, material (which works in demo).

But I currently move to React (yeah..i know, kind of traitor haha) and I've stopped following upgrade of angular/material..

gonna see when I have time to update the component for you guys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants