Skip to content

Instantly share code, notes, and snippets.

@desamtralized
Created January 15, 2016 14:48
Show Gist options
  • Select an option

  • Save desamtralized/0a15173df6adfa8385ec to your computer and use it in GitHub Desktop.

Select an option

Save desamtralized/0a15173df6adfa8385ec to your computer and use it in GitHub Desktop.
'use strict';
/**
* controller test
*/
angular.module('inOutDeliveryAdmin.test', ['ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/test', {
templateUrl: 'test/test.html',
controller: 'TestCtrl'
})
}])
.controller('TestCtrl', ['$scope', '$rootScope', '$route', '$routeParams', '$location', '$ngBootbox', 'config', 'products', TestCtrl]);
function TestCtrl($scope, $rootScope, $route, $routeParams, $location, $ngBootbox, $config, Products) {
$scope.model = [];
/**
* load data for update
*/
Products.run({businessId : "com.inoutdelivery.openwings"}).then(
function (result) {
$scope.model = result;
console.log(result);
},
function (e) {
// Handle error
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment