《AngularJS开发下一代Web应用》读书笔记与感想

 

该书一共130页打算四天读完,边读边记录。

1.

 

 

2.学习MogoDB

3.

4.

 5.

创建标识符的一段简单伪码模板: 
var myModule = angular.module(...);
myModule.directive('namespaceDirectiveName', function factory(injectables) {
	var directiveDefinitionObject = {
		restrict: string, 
		priority: number,
		template: string, 
		templateUrl: string, 
		replace: bool, 
		transclude: bool, 
		scope: bool or object,
		controller: function controllerConstructor($scope, $element, $attrs, $transclude),
		require: string,
		link: function postLink(scope, iElement, iAttrs) { ... }, 
		compile: function compile(tElement, tAttrs, transclude) {
			return {
				pre: function preLink(scope, iElement, iAttrs, controller) { ... }, 
				post: function postLink(scope, iElement, iAttrs, controller) { ... }
			}
		}
	};
	return directiveDefinitionObject;
});

  

 

posted @ 2017-10-29 21:14  董永辉Bruno  阅读(159)  评论(0编辑  收藏  举报