All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.static.js.controller.utils_controller.js Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
'use strict';
myApp.controller('UtilsController', [ '$scope', '$filter', '$window','MockService', '$sce',
		function($scope, $filter, $window, MockService, $sce ) {

			var self = this;
			self.input = "Enter the Json here to get formatted";
			self.output = "You will see the Formatted Output or Error";
			self.jsonFormatter = function() {
				try {
					self.output = JSON.parse(self.input);
				} catch (throw_error) {
					self.output = throw_error.message;
				}
			}


            self.pageUrl = null;

            self.iframeUrl = function(){
                return $sce.trustAsResourceUrl(self.pageUrl);
            };

            self.loadTutorialsPage= function(url){
                MockService.checkUrl(url).then(
                   function(d) {
                     self.pageUrl = url;
                   },
                   function(errResponse){
                     self.pageUrl = "notutorials.html";
                        console.error('Error while fetching Soap Mocks');
                     }
                   );
             };


		} ]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy