Показать сообщение отдельно
  #1 (permalink)  
Старый 07.12.2014, 07:58
Аватар для cyber
I am Student
Отправить личное сообщение для cyber Посмотреть профиль Найти все сообщения от cyber
 
Регистрация: 17.12.2011
Сообщений: 4,415

помогите с ангуляром
Я очень туплю, я уже часов 20 кодю, но на мелочи застрял помогите)
Короче, гугли но все что я на гугли я и так знаю и сделал.

Получаю "Error: [$injector:unpr] "
var app = angular.module('App', ['ngRoute']);


app.config(['$routeProvider',
    function($routeProvider) {
        $routeProvider.when('/', {
            templateUrl: 'partials/faculties-list.html',
            controller: 'FacultiesCtrl'
        })
        .otherwise({
            redirectTo: '/'
        });
    }]);

app.controller('FacultiesCtrl',  [ "$scope", "$http",  function ( $scope, $http) {
    $http.post("localhost:3000/post/getFaculties").success(function(data) {
        $scope.faculties = data;
    });
} ]);


<html ng-app="App">
    <head>
        <!--<meta charset="utf-8" />-->
        <!--<meta name="format-detection" content="telephone=no" />-->
        <!--<meta name="msapplication-tap-highlight" content="no" />-->

        <!--&lt;!&ndash; WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 &ndash;&gt;-->
        <!--<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />-->
        <!--<link rel="stylesheet" type="text/css" href="css/index.css" />-->
        <!--<title>Hello World</title>-->
        <script src="js/angular.min.js"> </script>
        <script src="js/angular-route.min.js"> </script>
        <script src="js/angular-touch.min.js"> </script>
        <script src="js/controllers.js"></script>
    </head>
    <body >

    <div ng-view > </div>

    </body>
</html>
__________________
Цитата:
Если ограничения и условия описываются как "коробка", то хитрость в том что бы найти именно коробку... Не думайте о чем то глобальном - найдите коробку.
Ответить с цитированием