Below is my project structure:
-modules
--> mymodule
-->controllers
-->services
-->views
-->mymod.js
-app-route.js
-index.html
where
mymod.js:
'use strict';
angular.module('mymodule',[
'myController.controllers',
'myController.services'
]);
and app-route.js:
var myApp = angular.module('myApp', ['ngRoute', 'ui.router' ,'ngCookies', 'myModule', 'homeModule', 'app-custom-filters'
,'interceptor-ctrl', 'config'
]);
$urlRouterProvider.otherwise('/login');
$stateProvider
.state("addition", {
url: "/addition",
templateUrl: 'modules/views/show.html',
controller: 'demoCtrl'
})
Now what I want is:
- I want to add a link in index.html like below
<li> <a href="/#/demourl"> <span>Link Test</span></a> </li>
and on clicking Link Test some operation will be done and shown on a html page view.html (present in views folder.)
I am confused how to do this step wise, I want to follow the structure defined above.
Please ask or edit the question if needed, I am already messed.