0

I have created AngularJS simple project using stackblitz, i am unable to
add module name.

i have tried multiple times, as a new bee bit confused.

here is a link for my project error. https://angularjs-nbhgkj.stackblitz.io full project https://stackblitz.com/edit/angularjs-nbhgkj

John dey
  • 99
  • 1
  • 8

1 Answers1

0

Issue is with the following line.

window.app = angular.module('app','date', requires);

change it to

window.app = angular.module('app', requires);

because angular.module expects module name and dependency array.

Allabakash
  • 1,969
  • 1
  • 9
  • 15
  • yes it works, but in date folder i have "hello world", how to render date component ?thats i am confused. updated link :https://stackblitz.com/edit/angularjs-nbhgkj?file=app.js and https://stackblitz.com/edit/angularjs-nbhgkj?file=date%2Fdate.html @Allabakash – John dey Oct 31 '19 at 09:44
  • you are using date as a directive , for that you need to create a directive. checkout this updated code. https://stackblitz.com/edit/angularjs-xpekvq?file=date%2Findex.js. – Allabakash Oct 31 '19 at 10:05
  • welcome @John Walter :) i hope it answered your query. Click on Checkmark in left, if it is cleared. – Allabakash Oct 31 '19 at 10:11
  • yeah, last one problem i am having,i am adding date picker but only texts are rendering, date picker is not rendering...https://stackblitz.com/edit/angularjs-ycomem?file=home%2Findex.js – John dey Oct 31 '19 at 10:17
  • https://stackblitz.com/edit/angularjs-ycomem?file=date%2Fdate.html @Allabhaksh – John dey Oct 31 '19 at 10:19
  • That is not working as you have not imported angular-material lib to your app. Please go through this. https://material.angularjs.org/latest/getting-started – Allabakash Oct 31 '19 at 10:28
  • @John Walter Here is updated code. https://stackblitz.com/edit/angularjs-u6uojn – Allabakash Oct 31 '19 at 10:32
  • Thanks for help in all way mate! Happy Coding:) @Allabakash – John dey Oct 31 '19 at 10:34