Created
August 24, 2017 10:25
-
-
Save enginehuzur/0d43afa845f227a889b8a37bd95084b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PlaylistController { | |
todos: Todo[]; | |
filter: string; | |
static $inject = ['$mdSidenav']; | |
public $mdSidenav: ng.material.ISidenavObject; | |
toggleLeft = this.buildToggler('left'); | |
toggleRight = this.buildToggler('right'); | |
constructor(private $mdSidenav: ng.material.ISidenavService) { | |
this.todos = [initialTodo]; | |
this.filter = SHOW_ALL; | |
this.$mdSidenav = $mdSidenav; | |
} | |
buildToggler(componentId) { | |
return function() { | |
this.$mdSidenav(componentId).toggle(); | |
}; | |
} | |
} | |
export const Playlist: angular.IComponentOptions = { | |
template: require('./Playlist.html'), | |
controller: PlaylistController | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment