javascript - AngularJS not working with Browsersync (Gulp) -


i'm new here , new gulp , angular. i'm trying make simple applications, learning purpose , i'm using multiple tutorials got lost in process. i'm trying serve angularjs/nodejs app gulps browser sync works fine apart angular. wrote in gulp file code needed serve app, , copied cdn header angular app script source angular file. error module not injected did right, when try on wamp server works fine. don't know i'm doing wrong here can shed light on app? here error "angular.js:4458 uncaught error: [$injector:modulerr]"

gulpfile

gulp.task('browsersync', function () {     browsersync({         server: {             basedir: 'app'         }     }); }); 

angular

(function () {       'use strict'       angular.module('app', []);       function main() {           var vm = this;           vm.title = "hello";       }      angular           .module('app')           .controller('main', main);   })() 

html

   <head>       <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>     <script src="js/angular.js"></script> <head> <body ng-app="app">  <div class="container hero" ng-controller="main vm">         <h1>{{vm.title}}</h1>         <p>name :             <input type="text" ng-model="name">         </p>         <h1>hello {{name}}</h1>     </div> <body> 


Comments