"server.js"
],
"dependencies": {
- "angular": "~1.4.5",
+ "bootstrap": "~4.0.0-alpha",
+ "font-awesome": "~4.4.0",
+ "oclazyload": "~1.0.5",
"angular-bootstrap": "~0.13.4",
"angular-translate": "~2.7.2",
"angular-ui-router": "~0.2.15",
- "oclazyload": "~1.0.5",
- "bootstrap": "~4.0.0-alpha",
- "font-awesome": "~4.4.0"
+ "angular": "~1.4.5"
},
"devDependencies": {
"angular-mocks": "~1.4.5"
// list of files / patterns to load in the browser
files: [
//bower:js
+ 'bower_components/jquery/dist/jquery.js',
+ 'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/angular/angular.js',
+ 'bower_components/oclazyload/dist/ocLazyLoad.js',
'bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
'bower_components/angular-translate/angular-translate.js',
'bower_components/angular-ui-router/release/angular-ui-router.js',
- 'bower_components/oclazyload/dist/ocLazyLoad.js',
- 'bower_components/jquery/dist/jquery.js',
- 'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/angular-mocks/angular-mocks.js',
//endbower
'src/showcase/app/**/*.module.js',
--- /dev/null
+(function () {
+ 'use strict';
+
+ angular
+ .module('app.widgets')
+ .directive('parentDirective', parentDirective);
+
+ /**
+ * @ngdoc directive
+ * @name app.widgets.directive:parentDirective
+ * @restrict EA
+ * @requires $scope
+ *
+ * <p>
+ * <br>
+ * {@link https://docs.angularjs.org/api/ng/type/$rootScope.Scope $scope}
+ * </p>
+ *
+ * @description
+ * Controller directive example.
+ *
+ * @element parent-directive
+ *
+ * @example
+ <example name="controller-directive" module="app.widgets">
+ <file name="index.html">
+ <parent-directive>
+ </file>
+ </example>
+ */
+ function parentDirective() {
+ return {
+ restrict: 'EA',
+ templateUrl: 'app/widgets/example-parent.directive.html',
+ link: linkFunc,
+ compile: function compile(element, attributes, transcludeFn) {
+ console.log('PARENT-DIRECTIVE: compile');
+ return {
+ pre: function preLink(scope, element, attributes, controller, transcludeFn) {
+ console.log('PARENT-DIRECTIVE: preLink');
+ },
+ post: function postLink(scope, element, attributes, controller, transcludeFn) {
+ console.log('PARENT-DIRECTIVE: postLink');
+ }
+ };
+ },
+ controller: ExampleParentController,
+ scope: {
+ max: '='
+ }
+ };
+
+ function linkFunc(scope, el, attr, ctrl) {
+ console.log('PARENT-DIRECTIVE: linkFunc');
+ }
+ }
+
+ /* @ngInject */
+ function ExampleParentController($scope) {
+ console.log('PARENT-DIRECTIVE: controller');
+
+ $scope.min = 3;
+ }
+
+})();
<!-- Vendor JavaScript -->
<!-- build:js(.) js/lib.min.js -->
<!-- bower:js -->
+ <script src="/bower_components/jquery/dist/jquery.js"></script>
+ <script src="/bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="/bower_components/angular/angular.js"></script>
+ <script src="/bower_components/oclazyload/dist/ocLazyLoad.js"></script>
<script src="/bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="/bower_components/angular-translate/angular-translate.js"></script>
<script src="/bower_components/angular-ui-router/release/angular-ui-router.js"></script>
- <script src="/bower_components/oclazyload/dist/ocLazyLoad.js"></script>
- <script src="/bower_components/jquery/dist/jquery.js"></script>
- <script src="/bower_components/bootstrap/dist/js/bootstrap.js"></script>
<!-- endbower -->
<!-- endbuild -->
<!-- build:js(.) js/app.min.js -->
<!-- inject:js -->
<script src="/src/showcase/app/widgets/widgets.module.js"></script>
+ <script src="/src/showcase/app/widgets/example-parent.directive.js"></script>
<script src="/src/showcase/app/widgets/example-controller.directive.js"></script>
<script src="/src/showcase/app/widgets/example-controller-as.directive.js"></script>
+ <script src="/src/showcase/app/widgets/example-child.directive.js"></script>
<script src="/src/showcase/app/welcome/welcome.module.js"></script>
<script src="/src/showcase/app/welcome/welcome.route.js"></script>
<script src="/src/showcase/app/welcome/welcome.controller.js"></script>