HTML5¼¼Êõ

Ç°¶ËangularJSÀûÓÃdirectiveʵÏÖÒƶ¯¶Ë×Ô¶¨ÒåÈí¼üÅ̵ķ½·¨ - À×À÷·çÐÐL(2)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-09-20 08:06 ÎÒÒªÆÀÂÛ( )

2¡¢Êý×Ö¼üÅÌÖеÄÊý¾ÝºÍÒ³ÃæµÄ±íµ¥ÖеÄÊý¾ÝʵʱÁª¶¯ÆðÀ´ÊÇͨ¹ýng-modelʵÏֵģ¬ÔÚ»ñÈ¡½¹µãµÄʱºòdirectiveÖлá»ñÈ¡µ½ng-modelµÄÖµ²¢¸³¸øÒ³ÃæÖÐµÄ±íµ¥£¬ÕâÑù¾ÍÄÜʵÏÖÊý¾ÝÁª¶¯ÆðÀ´£¬ÈÃÈí¼üÅ̸ü¼ÓÍêÃÀ£¬¿É²Î¿¼µÚÒ»ÕÅͼ

2¡¢Êý×Ö¼üÅÌÖеÄÊý¾ÝºÍÒ³ÃæµÄ±íµ¥ÖеÄÊý¾ÝʵʱÁª¶¯ÆðÀ´ÊÇͨ¹ýng-modelʵÏֵģ¬ÔÚ»ñÈ¡½¹µãµÄʱºòdirectiveÖлá»ñÈ¡µ½ng-modelµÄÖµ²¢¸³¸øÒ³ÃæÖÐµÄ±íµ¥£¬ÕâÑù¾ÍÄÜʵÏÖÊý¾ÝÁª¶¯ÆðÀ´£¬ÈÃÈí¼üÅ̸ü¼ÓÍêÃÀ£¬¿É²Î¿¼µÚÒ»ÕÅͼ¡£

 

3¡¢ÎªÁËÈÃÈí¼üÅ̵ã»÷µÄʱºò¸ü¼Ó±ÆÕ棬ÔÚ×Ô¶¨ÒåµÄdirectiveÖж԰´Å¥ÔªËؽøÐÐÁË´¦Àí£¬µ±µã»÷°´Å¥µÄʱºò¸øµ±Ç°±»µã»÷µÄÔªËØÌí¼ÓÒ»¸öclass£¬Ð§¹û´øÒõӰЧ¹ûµÄ°´Å¥ÍùÏÂÒƶ¯Á˼¸ÏñËØ£¬¿´ÆðÀ´Óеã»÷µÄЧ¹û£¬²úÆ·ºÍUIûÓиøÎÒÕâ¸öÐèÇó£¬ÊÇÎÒ×Ô¼º×ÔÓÉ·¢»ÓµÄ£¬¹þ¹þ¡£

 

4¡¢ÔÚÏîÄ¿ÖÐÓõ½×Ô¶¨ÒåµÄÕâ¸öÈí¼üÅ̵ÄʱºòÓÐЩÐèÒªÔÚµã»÷¼üÅ̵ÄÈ·¶¨°´Å¥Ö®ºóÐèÒª½øÐÐһЩÊý¾Ý´¦Àí£¬ÓÚÊǺóÀ´ÔÚdirectiveµÄÈ·¶¨°²ÄÝÖÐÖмÓÁËÒ»¸ö»Øµ÷£¬ÎÒÃÇ¿ÉÒÔÔÚµã»÷È·¶¨Ö®ºóµ÷ÓÃÕâ¸ö»Øµ÷£¬¿ÉÒԴﵽȷ¶¨Êý×ÖÖ®ºó½ô½Ó×Å×Ô¶¯È¥Ö´ÐÐÐèÒªÖ´ÐеÄʼþ¡£Ö»ÐèÒªÔÚdomÖмÓÉÏcallback="functionItem()"¼´¿É¡£

 

µ±È»Èç¹ûÊÇÓ¢ÎÄ×ÖĸµÄ»°Ò²¿ÉÒÔÓÃÕâÖÖ·½·¨£¬Ö»ÐèÒªÔÚ³õʼµÄÊý×éÖÐдÉÏÓ¢ÎÄ×Öĸ²¼¾ÖÅźü´¿É£¬ÒìÇúͬ¹¤¶øÒÑ¡£

ÒÔÉÏÊÇÎÒдµÄ¼òµ¥µÄÒƶ¯¶ËÊý×Ö¼üÅÌ£¬Ï£Íû¶Ô¿´µ½µÄÈËÓÐËù°ïÖú¡£

Èç¹ûÓв»×ãµÄµØ·½»¹ÍûÖ¸Õý´ó¼ÒÏ໥½»Á÷£¬Èç¹ûÓиüºÃµÄ·½·¨Ò²Çë¸æËßÎÒһϣ¬×÷Ϊһֻ³ÌÐòÔ³£¬ÎÒÒªÂëÎÞÖ¹¾³µÄÓÅ»¯ÎҵĴúÂë¡£

ÿÌì½ø²½Ò»¶ª¶ª¡£





 

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • Ç°¶ËʵÓù¦ÄÜ£ºÑ¡ÏÇл» - novai-L

    Ç°¶ËʵÓù¦ÄÜ£ºÑ¡ÏÇл» - novai-L

    2017-09-19 17:02

  • AngularJs ÑÓʱÆ÷¡¢¼ÆʱÆ÷ - Ī_Ī

    AngularJs ÑÓʱÆ÷¡¢¼ÆʱÆ÷ - Ī_Ī

    2017-09-16 12:11

  • ÀûÓÃHBuilder¿ª·¢»ùÓÚMUIµÄH5+ appÖÐʹÓðٶȵØͼ¶¨Î»¹¦ÄÜ - ³ÌÐòæ¹ÄÀøʦ

    ÀûÓÃHBuilder¿ª·¢»ùÓÚMUIµÄH5+ appÖÐʹÓðٶȵØͼ¶¨Î»¹¦ÄÜ - ³ÌÐòæÂ

    2017-09-13 09:00

  • JsÀûÓÃCanvasʵÏÖͼƬѹËõ - similar

    JsÀûÓÃCanvasʵÏÖͼƬѹËõ - similar

    2017-09-12 12:00

ÍøÓѵãÆÀ
Ì