Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // main.js
- console.log('bootstrap setup');
- $scope.singleModel = 0;
- $scope.radioModel = 'Middle';
- $scope.checkModel = {
- left: false,
- middle: true,
- right: false
- };
- /** app.js */
- 'use strict';
- angular
- .module('sourceApp', [
- 'googlechart',
- 'ui.bootstrap',
- 'ngAnimate',
- 'ngCookies',
- 'ngResource',
- 'ngRoute',
- 'ngSanitize',
- 'ngTouch'
- ])
- .config(function ($routeProvider) {
- $routeProvider
- .when('/', {
- templateUrl: 'views/main.html',
- controller: 'MainCtrl'
- })
- .when('/about', {
- templateUrl: 'views/about.html',
- controller: 'AboutCtrl'
- })
- .otherwise({
- redirectTo: '/'
- });
- });
- /** Chart **/
- $scope.chartObject = {};
- $scope.onions = [
- {v: "Onions"},
- {v: 3}
- ];
- $scope.chartObject.data = {"cols": [
- {id: "t", label: "Topping", type: "string"},
- {id: "s", label: "Slices", type: "number"}
- ], "rows": [
- {c: [
- {v: "Mushrooms"},
- {v: 3}
- ]},
- {c: $scope.onions},
- {c: [
- {v: "Olives"},
- {v: 31}
- ]},
- {c: [
- {v: "Zucchini"},
- {v: 1}
- ]},
- {c: [
- {v: "Pepperoni"},
- {v: 2}
- ]}
- ]};
- // $routeParams.chartType == BarChart or PieChart or ColumnChart...
- $scope.chartObject.type = 'PieChart';// $routeParams.chartType;
- $scope.chartObject.options = {
- 'title': 'How Much Pizza I Ate Last Night'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement