Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module("umbraco").controller("Scandbio.Products.EditController", function ($scope, $filter, notificationsService, dialogService, assetsService, ecommerceProductsResource) {
- // PROPERTIES
- $scope.content = {
- tabs: [
- { id: 1, label: "Artiklar" },
- { id: 2, label: "Extra tillval" }
- ]
- };
- $scope.model = $scope.model || defaultModel();
- // SCOPE FUNCTIONS
- $scope.add = function () {
- alert("Time to add some products!!");
- console.log(dialogService);
- dialogService.open({
- template: "~/App_Plugins/Scandbio/backoffice/products/dialog.add.html",
- show: true,
- callback: function (data) {
- $scope.actionInProgress = true;
- console.log(data);
- }
- });
- };
- // HELPER FUNCTIONS
- function defaultModel() {
- return [];
- };
- function init() {
- $scope.actionInProgress = true;
- $scope.model = ecommerceProductsResource.products.get();
- $scope.actionInProgress = false;
- };
- init();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement