Angularjs and Url routing and adding a controller for beginners
This is a quick tutorial on how to add a new controller to your angularjs application.
Just started working with Angularjs.
This is the basis of adding a new controller and wiring it into angularjs.
Awesome tutorial from angularjs. AngularJS tutorial
- add a when to the app.js. under the $routeProvider.
- create the controller-weva.js file and name the controller the same as the when block.
- create the weva-view.html same name as in the when block to receive the controller call.
- add the controller-weva.js script named in the when block to the index.html
- visit the url from the when block. May have to restart.