Skip to main content
removeu 30 caracteres do conteúdo
Fonte Link
require.config({
    baseUrl: '/',
    paths: {
       angular: 'assets/js/lib/angular',
       angularAMD: '..'assets/dependenciesjs/lib/angularAMD/angularAMD.min', // sua pasta de dependencias
       route: 'assets/js/lib/angular-route'
    },
    shim: {
       'angular-route': ['angular'],
       'angularAMD': ['angular']
    },
    deps: ['app']
    });
require.config({
    baseUrl: '/',
    paths: {
       angular: 'assets/js/lib/angular',
       angularAMD: '../dependencies/angularAMD/angularAMD.min', // sua pasta de dependencias
       route: 'assets/js/lib/angular-route'
    },
    shim: {
       'angular-route': ['angular'],
       'angularAMD': ['angular']
    },
    deps: ['app']
    });
require.config({
    baseUrl: '/',
    paths: {
       angular: 'assets/js/lib/angular',
       angularAMD: 'assets/js/lib/angularAMD/angularAMD.min', 
       route: 'assets/js/lib/angular-route'
    },
    shim: {
       'angular-route': ['angular'],
       'angularAMD': ['angular']
    },
    deps: ['app']
    });
Fonte Link

Sugiro você usar o angularAMD (https://github.com/marcoslin/angularAMD) e seguir o tutorial contido lá. De qualquer forma, tente fazer da seguinte forma (fiz correndo pode conter alguns errinhos):

main.js

require.config({
    baseUrl: '/',
    paths: {
       angular: 'assets/js/lib/angular',
       angularAMD: '../dependencies/angularAMD/angularAMD.min', // sua pasta de dependencias
       route: 'assets/js/lib/angular-route'
    },
    shim: {
       'angular-route': ['angular'],
       'angularAMD': ['angular']
    },
    deps: ['app']
    });

app.js

define(['angularAMD','angular-route'], function (angularAMD) {
   var app = angular.module('app', ['ngRoute']);
   app.config(['$routeProvider', function ($routeProvider) {
      $routeProvider.when("/", angularAMD.route({
         templateUrl: "app/views/home.php",
         controller: 'home',
         controllerUrl: 'app/controles/controller'
      }));
      $routeProvider.when("/sobre", angularAMD.route({
         templateUrl: "app/views/sobre.php",
         controller: 'sobre',
         controllerUrl: 'app/controles/controller'
      }));
      $routeProvider.when("/contato", angularAMD.route({
         templateUrl: "app/views/contato.php",
         controller: 'contato',
         controllerUrl: 'app/controles/controller'
      }));
      $routeProvider.otherwise({ redirectTo: '/' });
   }]);
   return angularAMD.bootstrap(app);
}); 

controller

define(['angularAMD'],
  function (angularAMD) {


     angularAMD.controller('home', function ($rootScope, $location) {
        $rootScope.activetab = $location.path();
     });

     angularAMD.controller('sobre', function ($rootScope, $location) {
        $rootScope.activetab = $location.path();
     });

     angularAMD.controller('contato', function ($rootScope, $location) {
        $rootScope.activetab = $location.path();
     });


});