Can you help me understand this?
Note: I am using ui-router, and I suspect that is the issue.
$stateProvider
.state('login',{
url:'/',
/*controller:'loginController',*/
controller: function(){alert('toto');},
templateUrl: './components/login/login.html',
controllerAs: 'vm'
})
I attempted to display an alert, but it didn't work! Before I called myController like this:
export default function router($routeProvider, $locationProvider,$stateProvider){
$stateProvider
.state('login',{
url:'/',
controller:'loginController',
templateUrl: './components/login/login.html',
controllerAs: 'vm'
})
In my app.js file, it is defined as follows:
angular.module('app', [
...
ngRoute,
ngCookies,
appLogin,
...
uirouter,]).config(router);
And in my Login module:
import loginController from './loginctrl.component.js';
export default angular.module('appLogin',[])
.controller('loginController', loginController)
.name;
My page is black with no console errors or lite-server errors. Can anyone assist me?