Skip to content

Instantly share code, notes, and snippets.

@adasq
Created April 30, 2014 14:08
Show Gist options
  • Save adasq/b9f85fbebff2f7dee211 to your computer and use it in GitHub Desktop.
Save adasq/b9f85fbebff2f7dee211 to your computer and use it in GitHub Desktop.
own lib ANGULAR
angular.module("ui.mylib", ["ui.mylib.tpls", "ui.mylib.example"]);
angular.module("ui.mylib.tpls", ["template/example.html"]);
angular.module("template/example.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("template/example.html",
"<b>to jest przykladowy template</b>");
}]);
angular.module("ui.mylib.example", [])
.directive('example', function () {
return {
templateUrl:'template/example.html',
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment