I am new to angularjs. I want to get angularjs variable to other js file. My angular js file code is...
angular.module('myApp.menu', ['myApp.cloverApi', 'myApp.preOperation'])
.controller('popMenuCtrl', ['$scope', '$http', '$routeParams', 'category', 'order', 'init', 'mInfoService', 'preop', 'mobileDetector', function($scope, $http, $routeParams, category, order, init, mInfoService, preop, mobileDetector) {
mInfoService.init($scope.errorCallback)
.success(function (data) {
$scope.merchant.shopName = $scope.capitalizing(data.name);
I want to get merchant.shopName to other js file so how can i get this variable value. and my html file code.
<span ng-show="!isMerchant">{{merchant.shopName}}</span>
I want to catch this variable in script file as below
<script>
addToHomescreen({
message: 'Add {{merchant.shopName}} to Your Phone, tap %icon, then <strong>Add to Home Screen </strog>',
displayPace: 0
});
</script>
but is not working