Hi,

Try putting your script tag into a seperate file and load it AFTER angular 
file has been referenced.
It's saying that angular can not find your controller and what I think is 
happening is it's falling through to your container and trying to 
instantiate it without angular being fully loaded yet.

Try the seperate file and see if that solves your problem.
If not, message back :)

Regards
Anthoni

On Monday, 28 March 2016 02:03:54 UTC+1, Fernando Villarroel wrote:
>
> Dear All
>
> This is my first post, i am new user of Angular.
>
> I am trying to follow the next example but not works.
>
> <!DOCTYPE html>
>
> <html>
>
>  <head>
>
> <meta charset="UTF-8">
>
> <title>AngularJS</title> 
>
> </head>
>
> <body ng-app>
>
> <script>
>
> function miCtrl ($scope) {
>
>         $scope.mensaje = "Mensaje desde el Controlador";
>
>         }
>
> </script>
>
> <script src="bower_components/angular/angular.js"></script> </body>
>
> <div class="container" ng-controller="miCtrl">
>
> <h1>{{mensaje}}</h1>
>
> </div>
>
> </body>
>
> </html>
>
>
> I did installed Angular from Bower.
>
> If i use the CDN
>
>
> https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js
>
>
> the example works fine
>
>
> If i use local angular i received:
>
>
> angular.js:13424 Error: [ng:areq] Argument 'miCtrl' is not a function, got 
> undefined
>
>
> http://errors.angularjs.org/1.5.3/ng/areq?p0=miCtrl&p1=not%20a%20function%2C%20got%20undefined
>
>     at angular.js:68
>
>     at assertArg (angular.js:1844)
>
>     at assertArgFn (angular.js:1854)
>
>     at $controller (angular.js:10003)
>
>     at setupControllers (angular.js:9138)
>
>     at nodeLinkFn (angular.js:8936)
>
>     at compositeLinkFn (angular.js:8333)
>
>     at compositeLinkFn (angular.js:8336)
>
>     at publicLinkFn (angular.js:8213)
>
>     at angular.js:1715
>
>
>
> What i doing wrong?
>
> Regards
>

-- 
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.

Reply via email to