angularAMD-sample
angularAMD-sample copied to clipboard
AngularAMD not load views on Google Chrome
Hi. I am learning to use angular. I am a few days ago trying to AngularADM with ui.router. At first I had a problem with an infinite loop in Google Chrome, to add a URL with '' has solved the infinite loop in the view given by otherwise. Now, Google Chrome does not show the views that I have defined in the application. Deputy code for app.js. This Prgrm works well on safari. I appreciate the help
the code attached is the example I'm using, I downloaded the Internet Code
define([ 'angularAMD', 'angular-ui-router' ], function (angularAMD) { 'use strict'; var app = angular.module("webapp", ['ui.router']); app.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home',angularAMD.route({
url: '/home',
templateUrl: 'views/home.html',
controller: 'homeController',
controllerUrl: 'controllers/home'}))
$stateProvider
.state('root',angularAMD.route({
url: '/',
templateUrl: 'views/home.html',
controller: 'homeController',
controllerUrl: 'controllers/home'}))
.state('about',angularAMD.route({
url: '/about',
templateUrl: 'views/about.html',
controller: 'aboutController',
controllerUrl: 'controllers/about'}))
;
$urlRouterProvider.otherwise("/home");
});
angularAMD.bootstrap(app,false,document.getElementById('mainView'));
return app;
});