I have changed the next file (and use ngRoute instead of ui-router):
*login.js*
(function(){ 'use strict'; angular .module('app.login', ['ngRoute'])
.component('login',
loginComponent) .config(loginRoute);
////////////////////////////////////////////// var loginComponent = {
bindings:{ vm: '=' }, controller: loginController, template: function(){ return
[ '<div>', '<h2>{{vm.message}}</h2>', '</div>' ].join('') } } function
loginController($element, $attrs){ var vm = this; vm.message='Login'; }
loginRoute.$inject
= ['$locationProvider', '$routeProvider']; function
loginRoute($locationProvider, $routeProvider){ // use the HTML5 History API
$locationProvider.html5Mode(true); $urlRouteProvider.otherwise('/');
$routeProvider.when('/login',
{ template: '<div><login></login><div>' }); } })();
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.