Reputation: 3
I am having cordova application with angularjs. I have successfully loggedIn to the dashboard page.
When I am clicking the events and the organization tabs, I am getting error for some specific pages having the $location.path('')
for all the tabs.
$location.path is working properly when I am using it in browser platform, but getting
Error: [$compile:tpload] when running in debug mode in android devices.
$scope.aboutus = function () {
$location.path("/aboutus");
}
$scope.notifications = function () {
$location.path("/notifications");
}
$scope.cardHolderPage = function () {
$location.path("/cardHolderPage");
}
$scope.getOwnCard = function () {
$location.path('/ownCards');
}
$scope.getEvents = function () {
$location.path("/events");
}
$scope.getOrganizations = function () {
$location.path('/organizations');
}
$scope.aboutus() and $scope.contactus() functions are working, but getEvents() and getOrganizations() is working, giving errors:
Error: [$compile:tpload] Failed to load template: views/loggedIn/VisitingCard/createVisitingCard.html (HTTP status: -1 ) http://errors.angularjs.org/1.6.9/$compile/tpload?p0=views%2FloggedIn%2FVisitingCard%2FcreateVisitingCard.html&p1=-1&p2=
Error: $templateRequest:tpload Error Loading Template
Failed to load template: views/loggedIn/VisitingCard/createVisitingCard.html (HTTP status: -1 )
myApp.config(["$routeProvider", function ($routeProvider) {
$routeProvider
when("/aboutus", {
templateUrl: "views/LoggedIn/AboutUs/aboutus.html",
controller: "DashboardController"
}).when("/notifications", {
templateUrl: "views/loggedIn/Notification/notifications.html",
controller: "NotificationController"
}).when("/events", {
templateUrl: "views/loggedIn/Events/events.html",
controller: "ViewEventController"
}).when("/organizations", {
templateUrl: "./views/loggedIn/Organizations/viewOrganizations.html",
controller: "ViewOrganizationController"
}).when("/cardHolderPage", {
templateUrl: "views/loggedIn/CardHolders/cardHolder.html",
controller: "CardHolderController"
})
}])
<li class="list-group-item clickable" ng-if="premium_status == 'Premium'">
<a class="list-group-item list-group-item-action" ng-click="getOrganizations()">
<i class="far fa-building"></i> Organization
</a>
</li>
<li class="list-group-item clickable" ng-if="premium_status == 'Premium'">
<a class="list-group-item list-group-item-action" ng-click="getEvents()">
<i class="far fa-calendar-alt"></i> Event
</a>
</li>
<li class="list-group-item clickable" ng-if="premium_status != 'Premium'">
<a class="list-group-item list-group-item-action" ng-click="premium()">
<i class="fa fa-th"></i> Go Premium!
</a>
</li>
<li class="list-group-item clickable">
<a class="list-group-item list-group-item-action" ng-click="aboutus()">
<i class="far fa-address-card"></i> About Us
</a>
</li>
I just want to route it to the another page.
Upvotes: 0
Views: 139