I have an angular application and am trying to connect to an ionic structure. I looked at an example application created by starter templates and noticed that the main angular application is in the www folder. So I created an ion starter app and moved the angular app to the www folder.
**** I can serve the application using ion feed and it works great
However, when I use an ionic emulator, the emulator only shows my homepage and throws errors. Unable to open resource url: file: ///android_asset/views/landing.html
So should I use ion tags to make my application work correctly? Since Ionic serves to correctly display my application, I assumed that it also works fine in the emulator.
This is what my index.html looks like. It uses angular and bootstrap and has no ion tags.
<!DOCTYPE html>
<html lang="en" data-ng-app="fhlLeads">
<head>
<title>FHL Leads</title>
<link rel="stylesheet" href="app/css/app.css" type="text/css" />
<link rel="stylesheet" href="app/css/base.min.css" type="text/css" />
<script type="text/javascript">
window.addEventListener('load', function (e) {
window.applicationCache.addEventListener('updateready', function (evt) {
if (window.applicationCache.status === window.applicationCache.UPDATEREADY) {
console.log('cache change detected; reloading page');
window.applicationCache.swapCache();
window.location.reload();
}
}, false);
}, false);
</script>
</head>
<body class="platform-android platform-cordova platform-webview">
<div ng-include src="'views/partials/navbar.html'"></div>
<div class="container-fluid">
<div class="row">
<fhl-page-loading></fhl-page-loading>
</div>
<div class="row"> </div>
<ui-view ></ui-view>
</div>
<div ng-include src="'views/partials/footer.html'"></div>
</body>
<script src="app/js/base.min.js" type="text/javascript"></script>
<script src="app/js/app.js" type="text/javascript"></script>
landing.html
<div class="row">
<div class="col-lg-3 col-md-12 col-xs-12 pull-right">
<div class="hidden-xs">
<div ng-include src="'templates/partials/sync-status-panel.html'"></div>
</div>
<div ng-include src="'templates/partials/activity-panels.html'"></div>
</div>
<div class="col-lg-9 col-md-12 col-xs-12">
<div ng-include src="'templates/partials/lead-grid.html'"></div>
</div>
I am using u-route in my angular application
(function() {
'use strict';
angular
.module('fhlLeads', [
'ui.router',
'ui.bootstrap',
'ui.mask',
'ui.utils',
'ngAnimate',
'ngGrid',
'toastr',
'LocalStorageModule',
'fhlConstants',
'fhlConfig',
'fhlPersist',
'fhlEvent'
])
.config(configure)
.run(runBlock);
configure.$inject = ['$stateProvider', '$urlRouterProvider', 'toastrConfig', 'localStorageServiceProvider'];
function configure($stateProvider, $urlRouterProvider, toastrConfig, localStorageServiceProvider) {
$urlRouterProvider.otherwise("/landing");
$stateProvider
.state('landing', {
url: '/landing',
templateUrl: 'Client/views/snapshot/landing.html',
controller: 'LandingController',
controllerAs: 'vm'
})
.state('agent', {
url: '/agent',
templateUrl: 'Client/views/agent/agent.html',
controller: 'AgentController',
controllerAs: 'vm'
})