1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > js 点击侧边栏展示内容_侧栏菜单点击其中一项 在右侧显示如何通过js实现?...

js 点击侧边栏展示内容_侧栏菜单点击其中一项 在右侧显示如何通过js实现?...

时间:2018-08-03 04:43:46

相关推荐

js 点击侧边栏展示内容_侧栏菜单点击其中一项 在右侧显示如何通过js实现?...

菜鸟教程()

angular.module('starter', ['ionic'])

.run(function($ionicPlatform) {

$ionicPlatform.ready(function() {

// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard

// for form inputs)

if(window.cordova && window.cordova.plugins.Keyboard) {

cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

}

if(window.StatusBar) {

// org.apache.cordova.statusbar required

StatusBar.styleDefault();

}

});

})

.config(function($stateProvider, $urlRouterProvider) {

$stateProvider

.state('app', {

url: "/app",

abstract: true,

templateUrl: "menu.html",

controller: 'AppCtrl'

})

.state('app.playlists', {

url: "/playlists",

views: {

'menuContent' :{

templateUrl: "playlists.html",

controller: 'PlaylistsCtrl'

}

}

})

// if none of the above states are matched, use this as the fallback

$urlRouterProvider.otherwise('/app/playlists');

})

.controller('AppCtrl', function($scope) {

})

.controller('PlaylistsCtrl', function($scope) {

console.log("PlaylistsCtrl");

$scope.playlists = [

{ title: 'Reggae', id: 1 },

{ title: 'Chill', id: 2 },

{ title: 'Dubstep', id: 3 },

{ title: 'Indie', id: 4 },

{ title: 'Rap', id: 5 },

{ title: 'Cowbell', id: 6 }

];

})

.controller('PlaylistCtrl', function($scope, $stateParams) {

})

Back

Left

Search

Browse

Playlists

{{playlist.title}}

About

Settings

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。