tips:angularjs

This is an old revision of the document!


AngularJS

Thanks to generator-gulp-angular

Inside static folder

.bowerrc

{
  "directory": "app/bower_components"
}

bower.json

{
  "name": "angular-seed",
  "private": true,
  "dependencies": {
    "angular": "~1.4.0",
    "angular-route": "~1.4.0",
    "angular-loader": "~1.4.0",
    "angular-mocks": "~1.4.0",
    "angular-bootstrap": "~0.13.2",
    "angular-wamp": "~0.1.6",
    "bootstrap": "3.3.5"
  }
}

Install bower modules

bower install

tree


Select scope of another controller (myController)

var $ascope = angular.element(
  document.querySelector("[ng-controller='myController']")
  ).scope();

See this

  • tips/angularjs.1441103163.txt.gz
  • Last modified: 2015/09/01 12:26
  • by scipio